while(false!== ($file = readdir($res))) {
if(strpos(strtolower($file),$q)!== false &&!in_array($file,$exclude)) {
if (($info["extension"] == "mp3") || ($info["extension"] == "wav")) {
}else{}
}
}
the problem is that when i put an error msg in the else of the red code part it loops as much as files that are not mp3 or wave type. so how i can stop that from happening? and if i did put it outside it wont read $file variable. or even is it possible to know how to make another variable that can bring results of my search outside the while loop cuz i tried alot of things but didnt work :S
Thanks in advance,
Maxwel