Jump to content

Creating a new variable name by combining other variable names


cliftonbazaar

Recommended Posts

$line_up=1;
WHILE($player = mysql_fetch_array($players)) {
  $home'$line_up'[0]=$player['playerID'];
  $line_up++;
}

 

What I am trying to get is the variable $home1[0] to be the players ID.  I have tried other variations of

$home'$line_up'[0]

  but can't get it to work  :'(

 

Please note that I cannot create an array instead as it would create a multidimensional array and I have read that I can't implode() that.

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.