I stored some values in db using json_encode.Now on fetching i got values like this ["ab","cd"].I have tried by exploding,json_encode and then decode.But nothing works.some of tried code is below
$array = "["ab","cd"]";
$value = (array)$array;
//-------------
$array = (array) $array;
// get_object_vars
$array = get_object_vars($object);
print_r($array);
when i loop directly on array i didn't get any values.Thanks for any help in advance. on this i got like this :
var_dump(json_decode($object));
print_r($object);
OUTPUT :
NULL ["MKD","KD3"]
$array = json_decode('["ab","cd"]');$arrayvalue (var_dump($array)). What you've posted has syntax errors so it's not much use.