On 12 Oct 2012 at 12:36, Maciek Sokolewicz <tularis@xxxxxxx> wrote: > However, this is likely not what the OP wants. What he likely does want > is to check if the filename is not '.' or > '..'. Of course, there are numerous ways to do this. From very simple > things like: > if ( $filename != '.' && $filename != '..') Personally if I have a loop looking at filenames in a directory, I'll start it with: while (something) { if ($filename=='.' || $filename=='..') continue; // rest of loop } That way, the unwanted cases don't clutter up the logic for the cases I do/might want. -- Cheers -- Tim
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php