Answers for "how to convert json data to array in php"

PHP
20

php convert array to json object

$myArr = array("apple", "banana", "mango", "jackfruit");

$toJSON = json_encode($myArr);

echo $toJSON;
Posted by: Guest on June-18-2020
0

php json data to array

json_decode('{foo:"bar"}');         // this fails
json_decode('{"foo":"bar"}', true); // returns array("foo" => "bar")
json_decode('{"foo":"bar"}');       // returns an object, not an array.
Posted by: Guest on October-15-2021
0

how to convert array into json php

convert data
Posted by: Guest on January-15-2022

Code answers related to "how to convert json data to array in php"

Browse Popular Code Answers by Language