RE: Initializing Array
| From: | Tim Ward | Date: | Tue, 29 Jan 2002 09:42:49 +0000 |
| Subject: | RE: Initializing Array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82538@lists.php.net to get a copy of this message | ||
As far as using them is concerned they are already zero (as indeed are
undefined elements). If you want force the type you'll have to step through
the array.
$pos[17][7][3] = 0; // will only set the value of that element, in PHP or C
Tim
www.chessish.com <http://www.chessish.com>
----------
From: pong-TC [SMTP:pong@taft.org]
Sent: 28 January 2002 19:07
To: php-general@lists.php.net
Subject: Initializing Array
Hello All
I would like to initialize the array $pos[17][7][3] to zero. Can i
do
like in C ie. $pos[17][7][3] = 0;? Or, will I have to do initialize
every
single element of array to zero by using loop?
Thank you.
Pong