I need to add $i to the end of $variable, for example:
$variable + $i to make $variable1, $variable2 etc.
$variable{$i} rings a bell but it doesn't seem to work,
anyone know if this is possible, and if so how?
Thanks
Question about adding $i to the end of $variable
Moderator: General Moderators
Search the web for variable variables...
Code: Select all
$i = 10;
$teller10 = 100;
echo ${'teller' . $i};- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
for future reference, they are called variable variables.
what's really sad is I typed that url from memory. I haven't gone to that page in months.
what's really sad is I typed that url from memory. I haven't gone to that page in months.