works like a charm....
just initializet the $retVal function...
$retVal = array();
rest of script here....
"Daniel alsén" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> i am trying to replace a datafile wich contains the contents of a
directory
> with an array.
> I am reading the directory and am trying to pass the value to an array.
What
> am i doing wrong? Shouldn´t $retVal contain the direcory info?
>
> Also, is there a way to use the content of an array without getting the
word
> 'Array' at the start?
>
> $handle=opendir('.');
> while (false !== ($file = readdir($handle)))
>
> if ($file != "." && $file != ".." && ereg(".jpg",$file)) {
>
> $retVal[count($retVal)] = $file;
>
> }
>
> # Daniel Alsén | www.mindbash.com #
> # [EMAIL PROTECTED] | +46 704 86 14 92 #
> # ICQ: 63006462 | #
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]