Answer the question
In order to leave comments, you need to log in
3 cycles in an array, how?
For me, a sore subject, arrays, cycles :(
I ask for help again ... There is a json string:
$json = '{"order":{"info":{"name":"test","login":"login"},"positions":[{"id":"210","amount":"1"},{"id":"110","amount":"1"},{"id":"310","amount":"1"}]}}';
$arrayPositions = json_decode($json, TRUE);
Answer the question
In order to leave comments, you need to log in
foreach ($arrayPositions['positions'] as $item) {
echo $item['id'];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question