Re: Getting error REG_EMPTY

From: Date: Wed, 05 Mar 2003 15:05:14 +0000
Subject: Re: Getting error REG_EMPTY
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138277@lists.php.net to get a copy of this message
> Way does this give me this error It's a warning, not an 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 You have 6 parts in your .txt file if you use | as the delimiter. In your list() call, though, you only give 4 variables. This leaves two parts that won't be assigned to a variable and it causes PHP to issue a warning. ---John Holmes...

« previous php.general (#138277) next »