Jump to content

[SOLVED] randomly displayed array- how to order?


aabbbiee

Recommended Posts

I am customizing an unsupported third-party open-source tool called Dropproof to make it look nicer, and I've run into an issue that my rudimentary PHP skills can't puzzle out.  I did do some searches for this but couldn't find anything.

 

http://www.abbiebrownphoto.com/dropproof/denise2/

 

If you click on the link above, you can see that it displays pictures from a directory on my server in an array.  For some reason, they are not displaying in any order (that I can tell).  I'd like them to be in filename order.

 

The original version of the tool also has this problem, so I didn't cause it from my slash-and-burn design work.

 

Here is the section of code that is called for this array.

<? for ($i=0; $i<count($images); $i++) { $img = $images[$i]; ?>
	<div class="img">
		<p><a href="javascript:;" onclick="loadDetail('<?=$img?>','<?=$i?>')"><img src="proofs/thumbs/<?=$img?>" alt="<?=$img?>" border="0" /></a></p>
		<p><?=$img?></p>
	</div>
	<? } ?>

 

I use Bluehost as a host if that's any help to you.  Current version is PHP 5.

 

Thank you!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.