Re: Replacing datafile with array
| From: | _lallous | Date: | Tue, 18 Sep 2001 11:46:12 +0000 |
| Subject: | Re: Replacing datafile with array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-67691@lists.php.net to get a copy of this message | ||
works like a charm....
just initializet the $retVal function...
$retVal = array();
rest of script here....
"Daniel alsén" <d@mindbash.com> wrote in message
news:PGEGIELINOCCEHLENIOJKENGCCAA.d@mindbash.com...
> 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@mindbash.com | +46 704 86 14 92 #
> # ICQ: 63006462 | #
>