Figured I'd expand on what these evaluate to, in case anyone gets lost
otherwise:

>-----Original Message-----
>From: Micah Stevens [mailto:[EMAIL PROTECTED] 
[snip]
>You can use variable variables.. like this:
>
>$num = 2
$num == 2 [obviously :) ]

>$varname = "id".$num;
$varname == "id2"

>$$varname = "id2 is stored here!";
$id2 == "id2 is stored here!" // $$varname == ${$varname} == ${"id2"}

You can use {}'s whenever there's ambiguity, just like arrays.  It's
true that these can get confusing, but they're also a really good way to
do some neat dynamic things and have predictable variable names for
them.

>It's in the docs in the variables section..

I couldn't have suggested a better place to get sorted out on all this -
Chris: browse the docs some, best way to wrap your head around things -
and the comments at the bottom tend to have useful real-world examples.

cheers,
- Martin Norland, Sys Admin / Database / Web Developer, International
Outreach x3257

The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.

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

Reply via email to