Re: Tricky variable syntax...
| From: | Terence | Date: | Tue, 28 Oct 2003 09:01:11 +0000 |
| Subject: | Re: Tricky variable syntax... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167858@lists.php.net to get a copy of this message | ||
>----- Original Message -----
>From: "Curt Zirzow" <php-general@zirzow.dyndns.org>
>To: "php" <php-general@lists.php.net>
>Sent: Tuesday, October 28, 2003 1:24 PM
>Subject: Re: [PHP] Tricky variable syntax...
>* Thus wrote René Fournier (m5@renefournier.com):
>> echo 'file name: '.$$fld_name.'<br>';
>>
>>What I want to do is echo the value of $img_photo_name. But how can I
>> refer to it?
>The straight forward method would be:
> $fld_name = $$fld . "_name";
>echo 'file name: '.$$fld_name.'<br>';
OR easier (IMHO)
echo 'file name: ' . Chr(36) . $fld_name . '<br>';