I am looping through a json response and want to load parts of the document into an array. Currently I'm only able to echo out the parsed strings.
foreach($data['movies'] as $item) {
echo $item['release_dates']['theater'];
}
How would I go about changing this so it loads the result into an array?
The parsed strings I want to put into the array are dates
Furthermore I have an example script working that finds the difference between 2 dates and loops an image for the difference. Could I manipulate this so instead of finding the difference between the variables, it finds the difference between the array objects constructed in the previous array loop?
$d1 = strtotime('2012-04-04');
$d2 = strtotime('2012-03-31');
$interval=($d1-$d2)/(3600*24);
for ($i = 0; $i <= $interval; $i++)
{
echo '<img src="test.jpg">';
}