NYCPHP Meetup

NYPHP.org

[nycphp-talk] Output name of Variable

Jim Musil jim at nettmedia.com
Fri Jan 31 13:34:48 EST 2003


That only seems to work with double quotation marks. ( Which doesn't mean
it's not the solution... )

$var = "Hello";
$$var = "World";

echo "$$var"; // Produces $Hello

echo '<p>';

echo $$var; // Produces World

echo '<p>';

echo '$$var'; // Produces $$var

On 1/31/03 1:27 PM, "Jon Baer" <jonbaer at jonbaer.net> wrote:

> $var = "Hello";
> $$var = "World";
> echo "Hello $$var"; // produces $Hello




More information about the talk mailing list