Take a look at the following code:
$a = json_decode('{"0":"xy"}', true);
This will return an associative array like [0 => "xy"]
.
Is there a way not to automatically convert the keys to numbers? The result I'd like to have would be the array ["0" => "xy"]
with strings as keys exclusively.