John W. Holmes wrote:
Just make sure $pictures is defined as an array before you try to push a value onto it (even using the method you have now), otherwise you'll get a warning.
It seems to be working fine this way without defining it as an array but I guess other languages would not accept that approach.
while ($file = readdir($dh)){ if (strstr ($file, '.jpg')){ $pictures[] = $file; }
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php