René Fournier wrote:
But here's my problem:
echo 'file name: '.$$fld_name.'';
What I want to do is echo the value of $img_photo_name. But how can I
refer to it?
Thanks.
...Rene
Is this for file uploads? It that case you should use $_FILES
superglobal array.
--
PHP General Mailing Lis
>- Original Message -
>From: "Curt Zirzow" <[EMAIL PROTECTED]>
>To: "php" <[EMAIL PROTECTED]>
>Sent: Tuesday, October 28, 2003 1:24 PM
>Subject: Re: [PHP] Tricky variable syntax...
>* Thus wrote René Fournier ([EMAIL PROTECTED]):
>
* Thus wrote René Fournier ([EMAIL PROTECTED]):
> echo 'file name: '.$$fld_name.'';
>
> 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.'';
Or t
René Fournier wrote:
What I want to do is echo the value of $img_photo_name. But how can I
refer to it?
echo 'file name: ' . ${$fld . '_name'};
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
I'm trying to refer to a variable using $$, but with a twist. So far,
this works:
echo 'temp file: '.$$fld.'';
In this case, $fld equals "img_photo" (although it could be anything).
The above statement could have thus been "echo 'file name:
'.$img_photo.'';" with the same results. So here I actua
5 matches
Mail list logo