creating variable names on the fly
| From: | Robert J. Cissell | Date: | Fri, 18 Aug 2000 18:37:15 +0000 |
| Subject: | creating variable names on the fly | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-12517@lists.php.net to get a copy of this message | ||
I have a list of variables e1, e2, e3, etc. I want to write some code like this:
$count = 1;
while($count <=4)
{
<set the value of element equal to e+count>
print($element);
}
How would I do the first line in the while loop? Thanks.
Robert