note 41153 added to language.variables
| From: | bhook at coder7 dot com | Date: | Wed, 31 Mar 2004 22:39:24 +0000 |
| Subject: | note 41153 added to language.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67433@lists.php.net to get a copy of this message | ||
I didn't see it mentioned anywhere, so I figure I would point this out.
<?php
//initializing multiple variables at once does work
$a=$b=$c=5;
echo "a=$a, b=$b, c=$c \n";
//also, initializing multiple arrays works equally well
$a=$b=$c=array(0=>'hello');
print_r($a);
print_r($b);
print_r($c);
//as does initializing array elements
$x[]=$y[3]=$z['cat']='world';
print_r($x);
print_r($y);
print_r($z);
?>
----
Manual Page -- http://www.php.net/manual/en/language.variables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41153
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41153&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41153&report=yes
Search -- http://master.php.net/manage/user-notes.php