Jump to content

[SOLVED] Variable inside a variable?


galvin

Recommended Posts

Can you have a variable INSIDE another variable? For example, if I do a loop where $i is a number and keeps increasing by 1, and for this example, say $i = 3, can I say..

 

$got$i = $counts['count'];

 

And have that be seen as a variable named "$got3"?

 

if so, is there a certain way to write that (i.e. do I need curly braces or quotes or anything?)

Link to comment
https://forums.phpfreaks.com/topic/159947-solved-variable-inside-a-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.