View Single Post
Old 11-13-2007, 03:39 PM   #3 (permalink)
Karl
The Reckoner
Advanced Programmer Top Contributor 
 
Karl's Avatar
 
Join Date: Sep 2007
Posts: 437
Thanks: 22
Karl is on a distinguished road
Default

you forgot to wrap the key/value pair in an array constructor call, the correct way to achieve this with array_push is:

PHP Code:
array_push($array, array('Chris' => 'Mellor')); 
* Edit, got my self in a muddle here, this is an example of array_merge, not array push:

PHP Code:
array_merge($array, array('Chris' => 'Mellor')); 
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

Last edited by Karl : 11-14-2007 at 01:14 PM.
Karl is offline  
Reply With Quote