On Tuesday, July 15, 2003, 9:08:25 AM, Lloyd wrote:
[ snip ]
LB> No matter what I do, it always returns "not here" even if there is a
LB> match....very frustrating!
LB> Any ideas?
Echoing what Mike said (about the preprocessing), here is some code to
help you out :
$search = "user1";
if (!($names = file("acc.txt"))) { die("Could not open acc.txt"); }
while (list($key,$val) = each($names)) {
$bits = explode(" ",$val);
while(list(,$line) = explode($bits)) {
if ($line == $search) {
echo "here";
} else { echo "whoops ... MIA"; }
}
}
--
Regards,
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php