$j={"a":"one","b":"two"} I want to convert this json into an associative array in php. i.e array("a"=>"one","b"=>"two"); | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

$j={"a":"one","b":"two"} I want to convert this json into an associative array in php. i.e array("a"=>"one","b"=>"two");

converting json to associative array in php

11th Sep 2018, 10:07 AM
perepi rajeswari
perepi rajeswari - avatar
1 Answer
0
You can use json_decode() function: http://php.net/json-decode Also, I recommend you to use the following package to manage your JSON files (it has a complete documentation): https://github.com/MAChitgarha/JSON
11th Jan 2019, 6:32 PM
$machitgarha
$machitgarha - avatar