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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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