Jump to content

sosoro

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by sosoro

  1. But how to sort by number .. just like in myslq. Like this: 1.jpg 2.jpg . . .9.jpg 10.jpg 11.jpg The code sort like this: 1.jpg 10.jpg 2.jpg . . 9.jpg
  2. Yes. Is working. For exemple: If i have (SORT_DESC) and i want to show the last 3: 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg Will show: 3.jpg 4.jpg 5.jpg What to add to show like this: 5.jpg 4.jpg 3.jpg Thanks!
  3. Thanks. But who to order asc or desc? Thank you ahain!
  4. 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!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.