Can't figure out for the life of me why this fails. Large PHP array of objects (1200 rows of data) var_dumps just fine. When I json_encode the array, the server fails. code: (without actual large json data)
function generateId() {
return substr(uniqid ('', true), -5);
}
$obj=(json_decode(utf8_encode($json), true));
foreach ($obj as $value) {
$newArray[generateId()] = $obj;
}
echo json_encode($newArray);