Re: muli-variable variables ? (something like that)

From: Date: Wed, 08 May 2002 20:44:43 +0000
Subject: Re: muli-variable variables ? (something like that)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-96666@lists.php.net to get a copy of this message
Anyone that wants some more info on "curly" syntax... http://www.php.net/manual/en/language.types.string.php and scroll down a bit. Took me a little while to find it, since you can't really search for a {. Cheers, # Nathan ----- Original Message ----- From: "Philip Olson" <philip@cornado.com> To: "Hawk" <hw2k@barrysworld.com> Cc: <php-general@lists.php.net> Sent: Wednesday, May 08, 2002 2:31 PM Subject: Re: [PHP] muli-variable variables ? (something like that) Use an array, although variable variables will work for this odds are an array will make you much much happier (and be more useful). Regarding variable variables, try something like: $g = 32; ${'team'. $g} = 'hello'; print $team32; // hello {braces} are where it's at. Regards, Philip Olson On Wed, 8 May 2002, Hawk wrote: > I have a loop that is using $g to loop a table, and $r to loop a content, > and I want to make a $ for every line that is printet by combining them > someway, like "$team$g$r = $tnme;" so there will be a $ with $team32 = > "Something" and a $team34 = "Somethingelse"; and so on, I think I've > done > something similiar before, but I can't remember how I did it, nor find the > file I did it in.. :) > > Håkan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#96666) next »