0

I have this json

{"response":{"status":"SUCCESS","totalsent":1,"cost":2}}

Now I want to extract the value of "status"

Please how can I do this in php?

Slate
  • 2,232
  • 30
  • 30
vsol
  • 97
  • 1
  • 8

1 Answers1

1
$yourJson = '{"response":{"status":"SUCCESS","totalsent":1,"cost":2}}';
$jsArr = json_decode($yourJson, true);
print_r($jsArr['response']['status']);
Yuriy Piskunov
  • 904
  • 7
  • 11