I am trying to parse the following json in php:
[{"id":"firstname","optionValue":""},{"id":"lastname","optionValue":""},{"id":"","optionValue":"Submit"}]
Im getting the string sent to me with a get request
This is what i got so far:
if(isset($_GET['data'])) {
$json_a = json_decode($_GET['data'], true);
foreach ($json_a as $a => $b) {
echo $a;
}
}
However echo $a; does not output anything.
Any ideas?
ifstatement is entered? Are errors on?