Re: Getting error REG_EMPTY
| From: | Greg Beaver | Date: | Wed, 05 Mar 2003 04:33:59 +0000 |
| Subject: | Re: Getting error REG_EMPTY | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138228@lists.php.net to get a copy of this message | ||
Hi
If $line is == '', you will get an error. Try @split('|', $line), or add a
test for empty lines like if (empty($line)) continue;
if you var_dump($line);, you'll probably see that there is an empty line in
members.txt
Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org
"Richard Kurth" <rdkurth@starband.net> wrote in message
news:95166547823.20030304182139@starband.net...
>
> Way does this give me this error
>
> Warning: REG_EMPTY: in emailusers.php on line 52
>
>
> $lines = file("data/members.txt");
> foreach($lines as $line){
> list ($logged_email,$logged_title,$logged_first_name,$logged_last_name) =
split("|", $line);
> if ($logged_email==$email) {print "<center>This email has already been
registered.</center>";
> exit;}
> }
>
>
> this is what is in the members.txt file
>
> rdkurth@directphp.com|Mr.|Richard|Kurth|1046828998|03/04/2003
>
> --
> Best regards,
> Richard mailto:rdkurth@starband.net
>