Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Php json string object to php array

Current License: CC BY-SA 3.0

14 events
when toggle format what by license comment
Jun 20, 2020 at 9:12 history edited Community Bot
Commonmark migration
Apr 15, 2014 at 6:49 comment added Shankar Narayana Damodaran @ShannonHochkins, I tried to approve but community says rejected. weird... I think since it was very minor , It got rejected. Please give a shot once more.
Apr 15, 2014 at 6:28 review Suggested edits
Apr 15, 2014 at 6:28
Apr 15, 2014 at 6:27 comment added Shannon Hochkins This worked better than the other answer I accepted, although, if you remove the square brakets, you don't need to go another level, I've edited your answer.
Apr 15, 2014 at 6:26 vote accept Shannon Hochkins
Apr 15, 2014 at 6:13 history edited Shankar Narayana Damodaran CC BY-SA 3.0
added 431 characters in body
Apr 15, 2014 at 5:36 comment added Shankar Narayana Damodaran Can you link me the text file ?
Apr 15, 2014 at 5:35 comment added Shannon Hochkins I beleive it's formatting my string wrong, I've just seen in newJSON it's being formatted like so: "{ip"":""192.168.1.110",startFrame":""1",endFrame":""11",startedCurrentFrameAt":""1397529891",status":""rendering",currentFrame":""0"}"
Apr 15, 2014 at 5:35 comment added Shankar Narayana Damodaran Why in the world are you using return? Are you inside a function or what ?
Apr 15, 2014 at 5:34 comment added Shannon Hochkins newJSON is defined, but if I just return $arr like so: return json_decode($newJSON, true); it is null...
Apr 15, 2014 at 5:29 comment added Shankar Narayana Damodaran If you are getting that from a text file , simply do ... $json = trim(file_get_contents('yourjsonfile.txt'));
Apr 15, 2014 at 5:27 comment added Shannon Hochkins I am still getting null with this, I can't define the $json variable like you have, to try and replicate, would I just write this $json = "'" . $data ."'"; ??
Apr 15, 2014 at 5:18 history edited Shankar Narayana Damodaran CC BY-SA 3.0
added 254 characters in body
Apr 15, 2014 at 5:10 history answered Shankar Narayana Damodaran CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /