From: "Paul Furman" <[EMAIL PROTECTED]>

> So when assigning values to an array inside a loop, it knows to advance
> to the next but then if I want to print those out at the same time, it's
> complaining
>
>    while ($file = readdir($fh)){
>        if (strstr ($file, '.jpg')){
>        $pictures[] = $file;
>        #print $pictures[];  #Fatal error: Cannot use [] for reading
>        }
>    var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
>    }

Can't do that, like it says. You just assigned $file to $print.. so just
display the value of $file.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to