How can i foreach it?
{“success”:false,“message”:“Simple Error!”}
This is on website btw.
How can i foreach it?
{“success”:false,“message”:“Simple Error!”}
This is on website btw.
Hi dada2,
I’m new to php. I was just wondering what the context of that statement is. Is that an array? It looks akin to a data dictionary I used in django a couple years ago.
You wouldn’t for each it.
It’s a JSON response,
$resp = '{"success":false,"message":"Simple Error!"}';
$data = json_decode($resp);
print_r($data);
Now you can access the keys directly.
This is simple api on website and i test this but i completly new in php.
Have a nice day