Webfreak
03-18-2004, 10:20 AM
Hi!
I have this script to read files in folder: <?php
$dir = "../myfolder";
$handle = opendir($dir);
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$files = $file."<br>";
}
}
closedir($handle); ?>
So it print files like this:
File1.php
File2.php
File3.php
....
Now i want to add this file into an array. How do i do this?
I have this script to read files in folder: <?php
$dir = "../myfolder";
$handle = opendir($dir);
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$files = $file."<br>";
}
}
closedir($handle); ?>
So it print files like this:
File1.php
File2.php
File3.php
....
Now i want to add this file into an array. How do i do this?