<?php// the php array$array=array();$array['key1']="value1";$array['key2']="value2";$array['key3']="value3";// encode the php array into JSON format$json=json_encode($array);// check out the resultsvar_dump($json);?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
$json='{"a":1,"b":2,"c":3}';var_dump(json_decode($json));//converts json to array$array=["a"=>1,"b"=>2,"c"=>3];echojson_encode($json_encode($json));//converts array to json
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>
<?php$json=file_get_contents("http://west.basketball.nl/db/json/stand.pl?szn_Naam=2014-2015&cmp_ID=373");$data=json_decode($json);if(count($data->stand)){// Open the tableecho"<table>";// Cycle through the arrayforeach($data->standas$idx=>$stand){// Output a rowecho"<tr>";echo"<td>$stand->afko</td>";echo"<td>$stand->positie</td>";echo"</tr>";}// Close the tableecho"</table>";}?>