Virginus Alajekwu
Virginus Alajekwu

Reputation: 241

How to get the content of a json output

I have this json

Print_r($send);

    {"status":"INSUFFICIENT_APIBALANCE"}

and I have this

$send = var_dump(json_decode($send));

Now am trying to do this

   if ($send->status == "INSUFFICIENT_APIBALANCE"){

     echo "Recharge Now";
}else echo "testing";

But am not getting the expected result, please help

Upvotes: 0

Views: 26

Answers (1)

Robo Robok
Robo Robok

Reputation: 22785

Remove var_dump():

$send = json_decode($send);

Upvotes: 1

Related Questions