kevinkhan Posted January 9, 2011 Share Posted January 9, 2011 can any body tell me why im not getting the value of the profile id $json = '{\"profile_id\":100000503667042,\"sk\":\"info\"}'; $obj = (json_decode($json)); print $obj->{'profile_id'}; Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted January 9, 2011 Share Posted January 9, 2011 i suspect it's because you single-quote the string, making it literal. the slashes become actual slashes. you don't need to escape anything within single quotes. removing the slashes in $json should fix the problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.