php-general | 2001092
Date: 09/30/01
- Next message: News: "Re: [PHP] still problem with getting HIGHest and LOWest VALUES"
- Previous message: Teqila MAN: "[PHP] still problem with getting HIGHest and LOWest VALUES"
- In reply to: Big5ive: "[PHP] Warning: unexpected regex error (14)"
- Next in thread: Rasmus Lerdorf: "Re: [PHP] Warning: unexpected regex error (14)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <20010930141539.81124.qmail <email protected>>,
big5ive <email protected> (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-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: News: "Re: [PHP] still problem with getting HIGHest and LOWest VALUES"
- Previous message: Teqila MAN: "[PHP] still problem with getting HIGHest and LOWest VALUES"
- In reply to: Big5ive: "[PHP] Warning: unexpected regex error (14)"
- Next in thread: Rasmus Lerdorf: "Re: [PHP] Warning: unexpected regex error (14)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

