note 37357 deleted from function.array-push by philip
| From: | philip@php.net | Date: | Fri, 09 Oct 2009 16:40:25 +0000 |
| Subject: | note 37357 deleted from function.array-push by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-161600@lists.php.net to get a copy of this message | ||
Note Submitter: ryan at sinn dot org
----
You can merge key and value combinations into "variable variable" arrays using {} around
the variable name.
Here's an example:
<?php
$arrayName = time();
${$arrayName}["mykey"] = "myvalue";
print $arrayName.":<br>"
print_r($$arrayName);
print "<br><br>";
?>