note 37357 modified in function.array-push by vrana

From: Date: Tue, 17 Aug 2004 14:48:16 +0000
Subject: note 37357 modified in function.array-push by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79746@lists.php.net to get a copy of this message
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>"; ?> --was-- You can merge key and value combinations into "variable variable" arrays using {} around the variable name. Here's an example: $arrayName = time(); ${$arrayName}["mykey"] = "myvalue"; print $arrayName.":<br>" print_r($$arrayName); print "<br><br>"; http://php.net/manual/en/function.array-push.php

« previous php.notes (#79746) next »