Add this line:

PHP Code: 
var_dump ($result); 
after this line:

PHP Code: 
 $result json_decode ($result,true); 
and tell me what's the output.