note 47270 added to function.array

From: Date: Tue, 09 Nov 2004 18:59:40 +0000
Subject: note 47270 added to function.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-80314@lists.php.net to get a copy of this message
<?php $arr1 = ( 0 => array ("customer"=>"Client 1","Item a"), 1 => array ("customer"=>"Client 2","Item b") ); ?> Example to dynamically add to an array: <?php $arr[] = array("customer"=>"Client 1","Item a"); $arr[] = array("customer"=>"Client 2","Item b"); print_r($arr); ?> gives two elements. So you don't need the solution mentioned below. ---- Manual Page -- http://www.php.net/manual/en/function.array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47270 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47270&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47270&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47270&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47270&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47270&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47270&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47270&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80314) next »