View Single Post
Old 02-04-2005, 03:57   #5 (permalink)
mattih5
Registered User
 
mattih5's Avatar
 
Join Date: Mar 2005
Location: Manchester
Posts: 64
What am I doing wrong here?

Does amybody know what i'm doing wrong here:

Quote:
$SearchString = "test";
print "<a href=\"".$file."\">".$file."</a><br/>";

$srcFile = "$file";
fileArray = @file($srcFile);
reset($fileArray);
while(list($key,$val)=each($fileArray)){
if (stristr($SearchString,$val)){
print htmlentities($ResultLine);
}
}

I keep getting an error with the while loop and i'm not sure if I have coded the IF statement correctly.
  Reply With Quote