Re: Array

From: Date: Thu, 15 Jun 2000 16:05:59 +0000
Subject: Re: Array
Groups: php.general 
Request: Send a blank email to php-general+get-1956@lists.php.net to get a copy of this message
$a = 1; $b = 2; $c = 3; You can then do this to add variables to the end of arrays: $ar[] = $a; $ar[] = $b; $ar[] = $c; Or you can do this: $ar[0] = $a; $ar[1] = $b; $ar[2] = $c; Either way, you can access it like this: echo $ar[0]; // displays 1 echo $ar[1]; // displays 2 echo $ar[2]; // displays 3 This is well described under the Array section of the PHP manual. -- Matthew Leverton - matthew@aeroinc.net - http://www.allegro.cc -----Original Message----- From: david <desbi22@cict.fr> To: php-general@lists.php.net <php-general@lists.php.net> Date: Thursday, June 15, 2000 10:59 AM Subject: [PHP-GENERAL] Array >Sorry but I'm new inPHP. >How can I put some variables in array >supose my variables are $a $b $c .... >thanks > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#1956) next »