Hi, I've got this string when parsed a web page.

string(41) "_result_ = {status:"OK",
name:"John Doe",

I believe that this code is JSON. but when I use json_decode() , it returns NULL. Someone Please help me parse this string. Thank you. :)

remove the "_result_ = " part.
use json_decode() on the rest

Hello pzuurveen, I've done like this. But, still I get NULL output. Can you please check it?

$var = preg_replace("/_result_=/", "", $result);
$var =trim($var,'"'); //quotes Free String
$output = json_decode($var);
//Output is NULL

in json the name also has to be inside "", I foreget about that.
Gess that you have to write your own parser.
something like:

    $var = preg_replace("/_result_=/", "", $var);
    $var =trim($var);
    $var =trim($var,'{'); //remove {
    $array = explode (",", $var);
    foreach ($array as $var2)
    var_dump ($result);

Perfect! Thank you very much. :)