note 12119 deleted from language.variables by aidan
| From: | aidan@php.net | Date: | Sat, 18 Sep 2004 04:45:31 +0000 |
| Subject: | note 12119 deleted from language.variables by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76923@lists.php.net to get a copy of this message | ||
Note Submitter: risa4 at law dot leidenuniv dot nl
----
If, for some reason you need to declare
a dynamic variable global, say $usertype1, $usertype2 etc...
do it like this:
$i=1;
$ready=#number of
generated
variables#
while ($i < $ready) {
$var="usertype$i";
global $$var;
###do the action with
the var, for
example:##
echo $$var;
$i++;
}