Skip to content

Instantly share code, notes, and snippets.

@shiondev
Created March 15, 2014 16:08
Show Gist options
  • Select an option

  • Save shiondev/9569672 to your computer and use it in GitHub Desktop.

Select an option

Save shiondev/9569672 to your computer and use it in GitHub Desktop.
Sample PHP for parsing Datafiniti JSON record
<?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