MCQs > IT & Programming > PHP > Which code snippet is True for Convert JSON string to Array?

PHP MCQs

Which of the following code snippet is True for Convert JSON string to Array?
 

 

Answer

Correct Answer: <? $jsonvar = '[{"name":"Jhon","gender":"male"}]'; $jsonarray = json_decode($jsonvar, true); print_r($jsonarray); echo $jsonarray[0]["name"]; ?>

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it