Skip to content

Instantly share code, notes, and snippets.

@temsool
Created December 29, 2022 11:19
Show Gist options
  • Save temsool/09157f83b1413d711e9f5d5718b89cb8 to your computer and use it in GitHub Desktop.
Save temsool/09157f83b1413d711e9f5d5718b89cb8 to your computer and use it in GitHub Desktop.
Can't decode JSON string in php
//https://stackoverflow.com/questions/3586401/cant-decode-json-string-in-php
$json = stripslashes('{\"json\":[{\"username\":\"1062576\",\"accountId\":\"45656565\"}]}');
$postarray = json_decode($json);
print_r($postarray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment