note 101391 deleted from function.array-push by salathe

From: Date: Tue, 14 Dec 2010 16:36:09 +0000
Subject: note 101391 deleted from function.array-push by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-174913@lists.php.net to get a copy of this message
Note Submitter: Sipos Tamas ---- Instead of <?php array_push($array, "new_item"); ?> you can always use <?php $array[count($array)] = "new_item"; ?> to add one more item onto the end of an array IN CASE: It is a "usual" array. By that I mean: a numeric array, which keys start with 0, and rising one by one with no items missing.

« previous php.notes (#174913) next »