php-general | 2001092
Date: 09/30/01
- Next message: Rasmus Lerdorf: "Re: [PHP] determine the size of picture ?"
- Previous message: Teqila MAN: "[PHP] determine the size of picture ?"
- In reply to: Big5ive: "[PHP] Warning: unexpected regex error (14)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
| is a special regex char and you would need to escape it to use it in a
literal sense. However, if you are splitting on a simple single char like
that, using split() is very inefficient. Use explode() instead, and since
explode() doesn't use regular expressions you wouldn't have to escape the
| with explode().
-Rasmus
On Sun, 30 Sep 2001, Big5ive wrote:
> Hi folks!
>
> Warning: unexpected regex error (14) in C:\WINDOWS\Profiles\Flo\My
> Documents\Projekte\www.big5ive.homeip.net\BBB\control\members_edit.php on
> line 18
>
> members_edit.php :
> <html>
> <head>
> <title>Members verwalten</title>
> </head>
> <link rel="stylesheet" href="big5ive.css" type="text/css">
> <body onMouseOver="self.status='Members verwalten'">
> <p><h1 align=center>Members verwalten</h1></p><br><br><br>
> <table>
> <tr align=left>
> <th>Benutzername</th>
> <th>Status</th>
> <th>Registriert seit</th>
> </tr>
> <?php
> $memberlist="http://big5ive.homeip.net/BBB/members/members.txt";
> $fp=fopen("$memberlist","r");
> $user=fgets($fp, 4096);
> $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.
> Any help would be amazing!
>
> --
> Big5ive
>
>
>
>
-- 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: Rasmus Lerdorf: "Re: [PHP] determine the size of picture ?"
- Previous message: Teqila MAN: "[PHP] determine the size of picture ?"
- In reply to: Big5ive: "[PHP] Warning: unexpected regex error (14)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

