note 106182 rejected from function.scandir by danbrown
| From: | danbrown@php.net | Date: | Mon, 17 Oct 2011 16:20:10 +0000 |
| Subject: | note 106182 rejected from function.scandir by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183922@lists.php.net to get a copy of this message | ||
Note Submitter: eracoon at gmail dot com
----
on line:
$result[]=$main_dir."/".$dir./".$file;
you forgot a double quote.
should be
$result[] = $main_dir . "/" . $dir . "/" . $file;
it is also good to set the array before filling it... no?