Jump to content

A little confusion goes along way..


desjardins2010

Recommended Posts

ok so this code here is working find in regards to fetching the users name and ID number

 

however it's just putting them in any order I want the first user to be user 1 and then 2 then so forth?

 

would a simple for loop do this if so before or after my while loop? or would I even need a while loop?

Link to comment
https://forums.phpfreaks.com/topic/220948-a-little-confusion-goes-along-way/
Share on other sites

If you're using a DB, you'll want to do the ordering at the DB level. If you're using MySQL you can append "ORDER BY ID ASC" to the end of your query. But as mentioned, posting the relevant code would help, you could be getting data from a CSV file for all we know.

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.