Answers for "array to json encode 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 array json encode key and value

json_encode($thearray, JSON_FORCE_OBJECT)
Posted by: Guest on August-15-2021

Browse Popular Code Answers by Language