So I have some relatively simple JSON I'm trying to display using PHP and I'm getting stuck, I think perhaps I'm not using decode or encode correctly. Maybe I simply overlooked something.
Here's the JSON...
{
"numFound": 43640,
"start": 0,
"maxScore": 0.7847167,
"docs": [],
"facets": {}
}
Here's my PHP...
<?php
$json_returned = file_get_contents("URL_OF_JSON_SOURCE");
$decoded_results = json_decode($array, true);
{
foreach($decoded_results as $results){
echo "Number Found:".$results['numFound'].";
echo "Start:".$results['start'].";
}
}
?>
I'm primarily just trying to get "numFound", "start", and "maxScore" to display. Thanks for any help, or even taking the time to read this post.
Here's the source JSON.. https://api.data.gov/gsa/fbopen/v0/opps?q=technology&data_source=FBO&limit=1&show_closed=true&api_key=CTrs3pcYimTdR4WKn50aI1GcUxyL9M4s1fyBbSer