Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001092

[PHP] Re: Replacing datafile with array From: _lallous (elias_bachaalany <email protected>)
Date: 09/18/01

works like a charm....

just initializet the $retVal function...

$retVal = array();
rest of script here....

"Daniel alsén" <d <email protected>> wrote in message
news:PGEGIELINOCCEHLENIOJKENGCCAA.d <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 #
> # d <email protected> | +46 704 86 14 92 #
> # ICQ: 63006462 | #
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>