You are here: First 10 files « PHP Programming Language « IT news, forums, messages
First 10 files

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация