Jump to content

[SOLVED] mysql_fetch_array with array_reverse


Fsoft

Recommended Posts

Hello,

$query2 = mysql_query("SELECT * FROM articles where art_cat = $cat");
		while($art_infos = mysql_fetch_array($query2))
		{

echo $art_infos["art_title"];

		}

 

Using this code above, I am able to echo out all the existing art titles available in my database, the only problem is, their order is from new older to new. I mean the title on top is older and the title on the last is the newer. I want them in reverse order,

 

so from NEW to OLD which makes a sense. I tried to use array_reverse. But it doesn't seem to work.

 

Please help me, how can I echo them out in reverse order?

 

Thanks a lot.

 

FAISAL!!!!!!!

 

Link to comment
Share on other sites

Thanks friends, but sadly non of them worked :(...

 

The 1st one "WolfRage" gives an error... And mattal999 was suppose to work but actually no :( it gives up same result as if I do it without changing my query :(

 

Any other help???

 

Thanks...

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.