Posted by sosoro on 03/05/07 15:23
Source
----------------------------------------
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($file = readdir($dh)) !== false)
{
// Is it a valid extension?
if(!is_dir($file) && is_numeric(strpos($file, ".")))
{
if($this->_IsValidExtension($file))
$arrImages[] = $file;
}
}
closedir($dh);
}
}
How to change the code to have in $arrImages[] just the first 10
files from that directory, not all files (Order: DESC or ASC).
Thanks!
Navigation:
[Reply to this message]
|