Re: syntax
| From: | Miguel Cruz | Date: | Wed, 27 Mar 2002 18:10:10 +0000 |
| Subject: | Re: syntax | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-90392@lists.php.net to get a copy of this message | ||
On Wed, 27 Mar 2002, John Fishworld wrote:
> so i want
> $newvar_$i = result 1
> $newvar_$i = result 2
>
> so I can use them outside the loops as
> $newvar_1 and $newvar_2
Why don't you use an array? That's what they're for.
Nevertheless,
$i = 1;
$varname = "newvar$i";
$$varname = "result 1";
miguel