Jump to content

creating new variables in loops?


freelance84

Recommended Posts

How do I create new variable names with in loops?

 

e.g:

 

for($a = 1 ; $a < $x ; ++$a)
   {
        $get_road = get_post($a);
        $road$a = $get_road;
        global $road$a;
   }

 

This doesn't work. But is this sort of thing even possible? If so does it have a name?

Link to comment
https://forums.phpfreaks.com/topic/201478-creating-new-variables-in-loops/
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.