Categories
How to iterate over such PHP array?
$arr = [{1: 4},{5: 2},{6: 45}...]; Did so
$arr = [{1: 4},{5: 2},{6: 45}...];
foreach ($arr as $obj) { foreach ($obj as $id => $count) { echo $id; echo $count; } }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question