whenever i have tried to use strpos it has worked successfully,
but now it doesnt seem to want to work...
i use this code to display files in a directory:
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if ($file!="." && $file!=".." && substr($file,-4)!=".php"){
echo $file;
}
}
}
closedir($dh);
}
it goes through the directory and outputs the files onto the screen
but now i want to test $file to see if a certain string is inside the filename using:
strpos($file,"YAC");
there is a file called: YAC_LEAGUE.htm
but strpos returns false even though it exists...
i know strpos is case sensitive, but i thought that it was only
sensitive to what case the needle is.
any ideas?