Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » PHP




 Page 1 of 1 [ 3 posts ] 



Author Message
 Post subject: php get da particular data in the multi array
 Post Posted: Mon Nov 16, 2009 11:30 am 
Offline

Joined: Sat Feb 21, 2009 1:10 pm
Posts: 52
QQ--hi every one


i m havin an multi array data, which wen the printed usin print_r, it was
displayed like this:

Code:

Code:
Array ( [recipes0] => Array ( [recipeID] => TM-ce57 [count] => 2 ) [recipes1] => Array ( [recipeID] => TM-52e2 [count] => 3 ) )


then I sort da data accordin 2 da [count] value, descendingly, nd now wen
I print_r da multi array data, it was displayed just like this:

Code:
Array ( [recipes1] => Array ( [recipeID] => TM-52e2 [count] => 3 ) [recipes0] => Array ( [recipeID] => TM-ce57 [count] => 2 ) )



now I need to get the first field of the sorted, which in this case is [recipes1], [recipes0] into some other variables or array, perhaps something like this:

Code:
$sortedData[0] = "recipes1";
$sortedData[1] = "recipes0";

how can I do this?

Any help would be greatly appreciated!!!

thanks


Top 
 Post subject: Re: php get da particular data in the multi array
 Post Posted: Mon Nov 16, 2009 11:31 am 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
http://www.php.net/reset & http://www.php.net/current


Top 
 Post subject: Re: php get da particular data in the multi array
 Post Posted: Mon Nov 16, 2009 11:33 am 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
http://in3.php.net/array_keys


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 3 posts ] 




Board index » Server Side Development » PHP


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron