> My newbie brain is maxed out on this, and I'm sure one of you more
> experience guys can quickly straighten me out.
> 
> I've got a variable:
> 
> $_yyyymmdd =  a_date_value;
> 
> Later, I've got four variables;
> 
> $foo= _;
> $bar=yyyy;
> $bleh=mm;
> $doh=dd;
> 
> I want to stick these variables together on the fly to get "_yyyymmdd
"
> and use that value as a variable name to return "a_date_value".
> 
> It would be the equivalent of,
> 
> echo "$foo$bar$bleh$doh";
> 
> That would give me "a_date_value"
> 
> I've read the docs on dynamic variables but still can't seem to break
> through mentally on this one.  Can you clear this up for me?

$s = $foo . $bar . $bleh . $doh;
echo $$s; //will give you a_date_value

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to