Created
November 9, 2011 04:22
-
-
Save whyisjake/1350376 to your computer and use it in GitHub Desktop.
foreach in a foreach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$json = file_get_contents('http://makeprojects.com/api/0.1/guide/1019'); | |
$json_output = json_decode($json); | |
$steps = $json_output->guide->steps; | |
foreach ($steps as $step) { | |
echo '<div>'; | |
echo $step->title; | |
$images = $json_output->guide->steps->images; | |
foreach ($images as $image) { | |
echo $image->text; | |
} | |
echo '</div>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment