Created
March 15, 2014 16:08
-
-
Save shiondev/9569672 to your computer and use it in GitHub Desktop.
Sample PHP for parsing Datafiniti JSON record
This file contains hidden or 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_str = file_get_contents("https://gist.githubusercontent.com/shiondev/9569051/raw/69b7d357190c3c5dde7f23bd220a37752b290a2c/sample_datafiniti_json_with_reviews"); | |
| $json_obj = json_decode($json_str,true); | |
| echo "Name: " . $json_obj['records'][0]['name']; | |
| echo "Text of 1st Review: " . $json_obj['records'][0]['review'][0]['text']; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment