I have an array that contains text, indexed by a timestamp (using time()) of when it was posted. For example, the output is something like:
Array ( [1160906743] => testing )
I then want to be able to add more text onto the end, resulting in something like
Array ( [1160906743] => testing
[1160906961] => testing again )
I tried using array_push() which didn't work (probably because this is an asociative array), until someone recomended the code
$time=time();
$new=$_POST['speech'];
$speech_array[$time] = $new;
This works, but instead of adding a new line onto the end, it overwrites the whole array. So instead of
Array ( [1160906743] => testing
[1160906961] => testing again )
I'd just get
Array ( [1160906961] => testing again )
Can anybody offer any help?