-1

I get this string "{"hitt":"","test":"1"}" and i want to convert it into array like ['hitt] = '', ['test'] = 1 kindly help me

1 Answers1

0

Try using json_decode

$json = '{"hitt":"","test":"1"}';
$array = json_decode($json, true)    //true to convert to array
var_dump($array)

Output:

array(2) {
    ["hitt"] => string("")
    ["test"] => string("1")
}