Questions & AnswersCategory: PHPHow to create JSON from Array in PHP?
Gowri Shankar Staff asked 5 months ago
1 Answers
Gowri Shankar Staff answered 5 months ago

You can use the json_encode() function to convert php array to json.


$data=array("Gowri" => "Shankar","Location" => "IN","Job" => "Software Professional");
echo json_encode($data);

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.