ameerulislam — 2013-10-12T13:54:47-04:00 — #1
I learned that
will decode the json string as object
will decode the json string as array..
For some reason I'm able to extract the json string as array but when I try it to do it as object it breaks. Do you have any idea why?
ameerulislam — 2013-10-12T14:17:35-04:00 — #2
crap!! the problem was that I was putting echo in front of it when it was an object
echo $userinfo = json_decode($userinfo);
but this works when it's an array.. like
echo $userinfo = json_decode($userinfo, true);
it prints Array..
It would be great if the first one printed object or something instead of breaking down..