note 26172 rejected from function.preg-match by jsjohnst
| From: | jsjohnst@php.net | Date: | Mon, 25 Aug 2003 01:36:27 +0000 |
| Subject: | note 26172 rejected from function.preg-match by jsjohnst | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55013@lists.php.net to get a copy of this message | ||
Note Submitter: jason.adamczyk@tik.com.au
----
I cant get a script to match a couple of variables. if ne1 can help, it would be greatly
appreciated!
nb: users.access is a standard txt file
what goes wrong: The script always returns $valid as false.
$users = file("users.access") ;
$valid = false;
for ($i = 0 ; $i > $users.length ; $i ++)
{
$temp = $users[$i];
if ( preg_match("/jason ; admin/i" , $temp) > 0 )
{
$valid = true;
break;
}
}