I'm updating an array stored in a DB. I've got the array from the DB, unserialised it, and am trying to push a new item onto the end. However, I want the index to be a timestamp, but when I use this code :
$time=time();
$new=$_POST['speech'];
array_push($speech_array, $time=>$new);
I get the error message "Unexpected T_DOUBLE_ARROW". Is there a way around this, or am I missing something very basic?