json_decode returns NULL after webservice call

Well, i had a similar issue and the problems was the PHP magic quotes in the server… here is my solution:

if(get_magic_quotes_gpc()){
  $param = stripslashes($_POST['param']);
}else{
  $param = $_POST['param'];
}
$param = json_decode($param,true);

Leave a Comment