Answer the question
In order to leave comments, you need to log in
How to escape space when parsing json using php?
Got json
{
"result": {
"data": {
"some data": {
"foo": "bar"
}
}
}
}
Answer the question
In order to leave comments, you need to log in
Alternatively, you can parse not into an object, but into an array, passing it true
as the second parameter json_decode()
, but in general - the answer to your question is the second comment under the documentation page about json_decode()
: https://php.net/manual/en/function.json-decode.php
Take a look there sometimes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question