Re: Warning: unexpected regex error (14)
| From: | CC Zona | Date: | Sun, 30 Sep 2001 14:41:28 +0000 |
| Subject: | Re: Warning: unexpected regex error (14) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69360@lists.php.net to get a copy of this message | ||
In article <20010930141539.81124.qmail@pb1.pair.com>,
big5ive@gmx.net (Big5ive) wrote:
> $list = split("|",$user, 3);
> echo "<tr
>
> align=left><td>$list[0]</td><td>$list[1]</td><td>$list[2]</td></tr>";
> ?>
> </table>
> </body>
> </html>
>
> How can i fix this error?
> Content of members.txt is
> Big5ive|Admin|24.09.2001
>
> The script should read the text file and split the content by | and write it
> in a table.
Split is a regex function, and "|" is a regex special character meaning
"or" when it's not escaped. You don't have need for regex matching here, so
just use explode() instead:
explode("|",$user, 3);
--
CC