convert Json data to Php Array
How To convert Json data to Php Array json_decode ( ) - Decode JSON Formatted Data The json_decode() PHP function converts JSON data to PHP array data. Parameters data The json data that you want to decode in PHP. dataTypeBoolean Optional boolean that makes the function return a PHP Associative Array if set to "true", or return a PHP stdClass object if you omit this parameter or set it to "false". Both data types can be accessed like an array and use array based PHP loops for parsing. depth Optional recursion limit. Use an integer as the value for this parameter. options Optional JSON_BIGINT_AS_STRING parameter. A very simple example: <?php $jsonData = '{ "user":"John", "age":22, "country":"United States" }'; $phpArray = json_decode($jsonData); print_r($phpArray); foreach ($phpArray as $key => $value) { echo "<p>$key | $value</p>"; } ...