atom feed3 messages in net.php.lists.php-generalArray Question
FromSent OnAttachments
Phillip S. BakerJul 18, 2000 9:38 am 
Matt McClanahanJul 18, 2000 9:58 am 
Jon PariseJul 18, 2000 9:59 am 
Subject:Array Question
From:Phillip S. Baker (phil@wordsandimages.com)
Date:Jul 18, 2000 9:38:06 am
List:net.php.lists.php-general

Okay I want to populate an array with a variable (i think that is the way to state it)

Ok ay I am using this code

$d = dir("images/"); while($entry=$d->read()) { if(($entry==".") OR ($entry=="..")) { echo ""; } else { echo $entry, "\n"; } } $d->close();

Now this code a list of images form the images folder and would return something like

image1.gif, image2.gif, image3.gif

Now I want to populate an array with this list of images that are pulled from this code. So I would want the above code to populate an array like

$image = array("image1.gif","image2.gif","image3.gif");

So if I dumped image4.gif into the images folder the array would dynamically update to read.... $image = array("image1.gif","image2.gif","image3.gif","image4.gif");

How would I go about doing this in PHP 3 not PHP 4??

Thanks folks --