i am fetching some data from multiple tables on the basis of particular id, instead of using joins i used nested queries, now the data needs to be to sorted as i am using nested queries it is difficult to use orderby
now below is the array i am generating!
Array
(
[0] => Array
(
[id] => 54
[name] => Array
(
[0] => Array
(
[name] => Jumbo Green Raisins Chinese
)
)
[path] => Array
(
[0] => Array
(
[path] => Jumbo_Green_Raisins_Chinese2.jpg
)
)
[sort] => Array
(
[0] => Array
(
[sort] => 2
)
)
)
[1] => Array
(
[id] => 55
[name] => Array
(
[0] => Array
(
[name] => Regular Green Raisins Chinese
)
)
[path] => Array
(
[0] => Array
(
[path] => Regular_Green_Raisins_Chinese.jpg
)
)
[sort] => Array
(
[0] => Array
(
[sort] => 4
)
)
)
[2] => Array
(
[id] => 56
[name] => Array
(
[0] => Array
(
[name] => Green Sunderkhani Raisins
)
)
[path] => Array
(
[0] => Array
(
[path] => Green_Sunderkhani_Raisins.jpg
)
)
[sort] => Array
(
[0] => Array
(
[sort] => 3
)
)
)
[3] => Array
(
[id] => 57
[name] => Array
(
[0] => Array
(
[name] => Jumbo Black Raisins
)
)
[path] => Array
(
[0] => Array
(
[path] => Jumbo_Black_Raisins.jpg
)
)
[sort] => Array
(
[0] => Array
(
[sort] => 1
)
)
)
)
basically i am using a loop to display the information retrieved in the above data, what i want to do is inside the loop display the sorted data the index sort
is what i need to see while sorting, i could do it with db too but i have to mess up code in a lot of places it would be alot better if i do i this way! any help?