I want to handle JSON data structures that could look like this:
$json = {"1":"some content here","hello":"world"};
I use the json_decode method from PHP to transform this into an array:
$myArray = (array)json_decode($json);
My problem now is that
unset($myArray["1"]);
Doesn't do anything.
Can you give me any advice? I also tried:
unset($myArray[(String)"1"]);
Thank you!
EDIT: There was an error in my question, thanks for the correction in the comments!
unset($myArray["1"]);?