Re: Dynamic Variable names

From: Date: Sun, 09 Mar 2003 13:38:23 +0000
Subject: Re: Dynamic Variable names
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26248@lists.php.net to get a copy of this message
The way to go is: ${"tips_".$i} where $i is your increment control variable HTH Ignatius, Brussels "Where the fuck is Belgium?" (D. Ivester, CEO, Coca-Cola) ----- Original Message ----- From: "David Rice" <haloplayer@hotmail.com> To: <php-db@lists.php.net> Sent: Sunday, March 09, 2003 1:34 PM Subject: [PHP-DB] Dynamic Variable names > > > > > Just a quick question about dynamic variables > > would like to end up with a variable called > $tips_1 > $tips_2 > ... > $tips_n > > where "n" is the value of the variable $sid > > i have tried > > $tips . '$sid'; > > and other variants, but i can't get one that doesn't return a parse error or > T_VARIABLE error. > > _________________________________________________________________ > Worried what your kids see online? Protect them better with MSN 8 > http://join.msn.com/?page=features/parental&pgmarket=en-gb&XAPID=186&DI=1059 > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#26248) next »