I have arrays stored in files which have been serialized in php so that I don’t have to explode/implode every time I use the data.
Is there a way by which i can unserialize and add a dimension to it in JS ?
the php equivalent would look like
$key = $_POST['num']; $array = unserialize(file_get_contents("file.data"); $array[$key] = "marked"; file_put_contents(serialize($array);
$key does not yet exist but i don’t know if it will affect the rest of the the code