note 6109 deleted from function.array-push by jimw

From: Date: Fri, 21 Dec 2001 00:42:29 +0000
Subject: note 6109 deleted from function.array-push by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23677@lists.php.net to get a copy of this message
I needed to use array_push with PHP3, and instead of array_push($array,$item) I used $array[count($array)] = $item, to add the last element. Works if you have number-based arrays (i.e elements are ordered).

« previous php.notes (#23677) next »