I have issue with decoding json ex. ‘{“a”:”b”}’

One of two things is happening here:

Invalid JSON

If the value of $extra isn’t a properly-constructed JSON string, then json_decode( $extra ) is returning null. echo null; won’t print anything to the screen.

Valid JSON

If $extra is a valid JSON string, When you json_decode() it, you’ll get an object (specifically, a stdClass object). There’s no way to echo a stdClass object; when I try that, I get a PHP warning:

PHP Warning:  Uncaught Error: Object of class stdClass could not be converted to string

So your echo( $data ); line is throwing a warning, which your server is most likely suppressing.

I’d recommend using var_dump( $data ); to see what’s actually happening.

techhipbettruvabetnorabahisbahis forumutaraftarium24eduedusedueduseduedueduedusedusedus