note 47680 deleted from language.types.array by sean
| From: | sean@php.net | Date: | Thu, 25 Nov 2004 15:32:10 +0000 |
| Subject: | note 47680 deleted from language.types.array by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-81022@lists.php.net to get a copy of this message | ||
Note Submitter: ckengche at yahoo dot com
----
Note that dynamically creating arrays using the language construct array() does not work as
expected.
Eg: if $array_elements is constructed dynamically to contain
the following value :
$array_elements =
"1=>'first',2=>'second',3=>'third'";
Trying to create an array type using:
$my_array = array($array_elements); // OR
$my_array = array("$array_elements");
will not give you the expected results.
It yields an array of one element with the value as follows :
[0] => 1=>'first',2=>'second',3=>'third'
----
Reason: useless note