Jump to content

sosoro

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by sosoro

  1. 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.