Answers for "convert array to json associative objects php"

PHP
10

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 string to associative array

$assocArray = json_decode($data, true);
Posted by: Guest on January-20-2021

Code answers related to "convert array to json associative objects php"

Browse Popular Code Answers by Language