RE: How to access JSON decoded array in PHP?

How to access JSON decoded array in PHP?

Anonymous Default Asked on April 5, 2019 in JSON.
Add Comment
1 Answers

$json = '["C","JAVA","PHP","C++"]';

$lang = json_decode($json);

// access first element of $lang array

echo $lang[0]; // C

Team Leader Answered on April 19, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.