You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The readdir() method sorts objects in the filesystem order, but i think it would be nice to sort images alphabetically so you can have some control of the order.
I've fixed it locally but want to suggest you change the code to something like this:
$images = array();
if ($handle = opendir($game.'/images'))
{
while (false !== ($entry = readdir($handle))) array_push($images, $entry);
sort($images);
}
foreach($images as $entry)
{
// business as usual in here
}
Anyway, thanks for a great project!
Are
The text was updated successfully, but these errors were encountered:
The readdir() method sorts objects in the filesystem order, but i think it would be nice to sort images alphabetically so you can have some control of the order.
I've fixed it locally but want to suggest you change the code to something like this:
Anyway, thanks for a great project!
The text was updated successfully, but these errors were encountered: