I've looked at how to decode a string here however it requires the key's be wrapped in quotes and my data doesnt, example:
The below data, is saved in a .txt file, I'm using file_get_contents() to read the files, I do not have control over the below data.
THIS IS MY DATA
"{
ip : "192.168.1.110",
startFrame : "1",
endFrame : "11",
startedCurrentFrameAt: "1397529891",
status: "rendering",
currentFrame: "0"
}"
In php, I want to be able to read this data, and access each key, this is what I've tried:
$arr = json_decode($data, true)['status'];
$arr just returns null, because the key's aren't quoted, is there a work around for this?
I've found many answers to this question, but all have the key's quoted.