Well this was a 7 years old question here and I need the answer from this thread no satisfying answer was given: getting value from json string php someone should kindly assist as my code is of this format:
after json_decode()
var_dump gave this as output:
String(384) “{“data:{“foo”: bar, “foo1”: “bar1”, “foo2”: bar2, }}
Note that bar is int, bar1 string etc.
How can I get "foo1": "bar1" from this string; generally how can I get values from setups like this in PHP?
var_dump(json_decode($value))?““And the fact that the first{is quoted. This is not valid JSON.