sosoro
-
Posts
4 -
Joined
-
Last visited
Never
Posts posted by sosoro
-
-
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!
-
Thanks.
But who to order asc or desc?
Thank you ahain!
-
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!
[SOLVED] First 10 files
in PHP Coding Help
Posted
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