note 15702 modified in function.array-push by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 14:48:31 +0000 |
| Subject: | note 15702 modified in function.array-push by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79722@lists.php.net to get a copy of this message | ||
Array_push also works fine with multidimensional arrays. Just make sure the element is defined as an
array first.
<?php
$array["element"][$element]["element"] = array();
array_push ($array["element"][$element]["element"], "banana");
?>
--was--
Array_push also works fine with multidimensional arrays. Just make sure the element is defined as an
array first.
$array["element"][$element]["element"] = array();
array_push ($array["element"][$element]["element"], "banana");
http://php.net/manual/en/function.array-push.php