How to sort the json data?

Good evening, please tell me how to do so through the json and output it to a table
json which are:

I transformed into an array for convenience
 [1] => Array
 [0] => Stone
 [1] => 70
 [2] => 3
 [3] =>

 [5] => Array
 [0] => Root
 [1] => 50
 [2] => 1
 [3] =>


How do I get the id so I could then request the desired information on the go and be sure to count inside each array??
March 23rd 20 at 18:42
1 answer
March 23rd 20 at 18:44
If you honestly do not understand your problem, it seems to be all clearly visible, and what exactly the problem is not clear.
$array[0][2], where $array is your transformed array [0] is your id, [2] is your count
To build the table is enough to loop through your array.
How to call the function I know I don't know how to handle an array, so I turns out that [1] and [5] is the ides that I need and in these arrays which I need, but I need to get ID and count and I don't know how to implement it that I could then make a table just like I don't understand how can I process the array to get what you need
ID | Number | Picture
id: 1 count:3 img:
id: 5 count:1 img: - shawn_Hudson59 commented on March 23rd 20 at 18:47
foreach ($array as $key => $value) {
 echo "id: ".$key." count:".$value[2]." img:".$value[3]."<br>";
- joseph.Lowe commented on March 23rd 20 at 18:50
@joseph.Lowe, Thank You - shawn_Hudson59 commented on March 23rd 20 at 18:53

Find more questions by tags PHP