lundi 19 mars 2018

json_decode returnning NULL

Here response from API server :- [{"Message":"{*} Mobile No should be unique."}]

Json_decode

var_dump(json_decode($response));

Here is output

NULL NULL NULL

Main thing here is, when getting response from server, json_decode() returning NULL,

If i copy respone and assign to variable like below, json_decode() works fine :-

$someJSON = '[{"Message":"{*} Mobile No should be unique."}]';

Please help



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2G3EBTQ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire