Re: Dynamic Variable names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:  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
>
>


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux