Answers for "json_encode to php from object to array"

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
8

php json_encode

$person = array( 
    "name" => "Johny Carson", 
    "title" => "CTO"
); 
$personJSON=json_encode($person);//returns JSON string
Posted by: Guest on July-01-2019

Code answers related to "json_encode to php from object to array"

Browse Popular Code Answers by Language