Jump to content

Row within a Row?


Ryuujin

Recommended Posts

I am trying to get a $row[] var inside a $row[] var. This may not be possible...

Here is my code.

									$result = mysql_query("SELECT units.name, units.offense, units.defence, units.cost, users.FootSoldier, users.Marine, users.Spy, users.Tank, users.Jet, users.Grenadier, users.Rocketeer, users.Battleship FROM units, users WHERE users.username='$_SESSION[user]' ORDER BY units.offense ASC");
									while($row = mysql_fetch_array($result))
									{
										$ammount = 'users.'.$row['name'];
								echo	'
										<tr>
											<th>' .$row['name']. '</th><th>' .$row['offense']. '</th><th>' .$row['defence']. '</th><th>$' .$row['cost']. '</th><th>' .$row['$ammount']. '</th>
										</tr>';
									}

 

Any ideas? I am trying to get $row['$ammount'] to have the $ammount var info inside it.

Thanks,

-Ryu

Link to comment
https://forums.phpfreaks.com/topic/106076-row-within-a-row/
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.