<?php
$a = '{"product": [{
"title":"Product One",
"price":"Price One",
"desc":"Description One",
"image": [{
"img":"image 1 1"
},{
"img":"image 1 2"
},{
"img":"image 1 3"
}]
}, {
"title":"Product Two",
"price":"Price Two",
"desc":"Description Two",
"image": [{
"img":"image 2 1"
},{
"img":"image 2 2"
},{
"img":"image 2 3"
}]
}]
}';
$product = json_decode($a, true);
foreach($product['product'] as $value) {
foreach($value["image"] as $image) {
echo "Image: " .$image['img'] . "\n";
}
}