Answers for "json_decode a array"

0

json decode php array

<?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 table
        echo "<table>";

        // Cycle through the array
        foreach ($data->stand as $idx => $stand) {

            // Output a row
            echo "<tr>";
            echo "<td>$stand->afko</td>";
            echo "<td>$stand->positie</td>";
            echo "</tr>";
        }

        // Close the table
        echo "</table>";
    }
?>
Posted by: Guest on April-10-2022
0

json_decode

<?php
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
 
var_dump(json_decode($json));
var_dump(json_decode($json, true));
 
?>
Posted by: Guest on November-25-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language