Tricky variable syntax...

From: Date: Tue, 28 Oct 2003 04:00:30 +0000
Subject: Tricky variable syntax...
Groups: php.general 
Request: Send a blank email to php-general+get-167835@lists.php.net to get a copy of this message
I'm trying to refer to a variable using $$, but with a twist. So far, this works: echo 'temp file: '.$$fld.'<br>'; In this case, $fld equals "img_photo" (although it could be anything). The above statement could have thus been "echo 'file name: '.$img_photo.'<br>';" with the same results. So here I actually echo the value of the variable $img_photo. This is what I want. But here's my problem: 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? Thanks. ...Rene

« previous php.general (#167835) next »