Jump to content

I need some while loop help.


iStriide

Recommended Posts

I'm having a problem as you can see here http://www.halobattles.comyr.com/profile.php?player=iStriide, and i'm not sure on how to make it where it just lines up side-by-side. Here's the code:

<?php

$find_weapons = "SELECT * FROM weapons WHERE Username = '$player' ORDER BY Weapon_Level DESC";
$run_weapons = mysql_query($find_weapons);

echo "
<div class='weapons-list'>

<div class='profile-general-stats-heading'>
<h4>Weapons List</h4>
</div>
";

while($list = mysql_fetch_array($run_weapons)){

$weapon_name = $list['Weapon_Name'];
$weapon_image = $list['Weapon_Image'];
$weapon_level = $list['Weapon_Level'];

echo "
<table>
<tr>
<td align='middle'><img src='$weapon_image'/><br/>$weapon_name<br/>$weapon_level</td>
</tr>
</table>
";

}

echo"
</div>
";

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.