So basically, this string is in the database and I can't find what saved it so I'm not sure what method they used to create the string... But I need to break it into an array.
I tried originally using $array = unserialize($str), however that printed "not ok." This method prints "ok" however, nothing shows up afterwards.
$str = '{"media_id":"235","stream":"0","maxspeed":"3000","maxloads":"0","mloadperInterval":"0","mloadInterval":"0","maxtime":"0","publish_up":"0","publish_down":"0"}';
echo $str;
$array = json_decode($str);
if ($array !== false) {
echo "ok";
} else {
echo "not ok";
}
echo '<br/><br/>'.print_r($array,true);
What am I doing wrong?