note 25022 added to function.array
| From: | me at rack1 dot php dot net | Date: | Sun, 08 Sep 2002 10:33:31 +0000 |
| Subject: | note 25022 added to function.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36331@lists.php.net to get a copy of this message | ||
I didn't think there were differences between single and double quotes. But there was. At least
in PHP 4.2.2 on FreeBSD 4.6.1.
$val1 = "a";
$val2 = "b";
$val3 = "c";
$val_double_quotes = array("$val1", "$val2", "$val3");
$val_single_quotes = array('$val1', '$val2', '$val3');
print_r($val_double_quotes) displays;
Array
(
[0] => a
[1] => b
[2] => c
)
BUT print_r($val_single_quotes) displays;
Array
(
[0] => $val1
[1] => $val2
[2] => $val3
)
--
http://www.php.net/manual/en/function.array.php
http://master.php.net/manage/user-notes.php?action=edit+25022
http://master.php.net/manage/user-notes.php?action=delete+25022
http://master.php.net/manage/user-notes.php?action=reject+25022