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
  • 3,189
  • 1
  • 31
  • 32
vsol
  • 97
  • 2
  • 10

1 Answers1

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