Need a loop that gets from diffrent datacells or a solution!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Goofan
Forum Contributor
Posts: 305
Joined: Wed Nov 04, 2009 2:11 pm
Location: Sweden

Re: Need a loop that gets from diffrent datacells or a solution!

Post by Goofan »

Goofan wrote:well i get that but i dont see how that can fix the problem...
the picture im sending in might explain better then words!


Either i dont get ure solution or ure solution aint the one im in need of(thanks anyway)

Code: Select all

 
 <table border="1">
   <tr>
    <th>Units</th>
        <th>AtkArm</th>
    <th>Buyfor</th>
        <th>Sellfor</th>
    <th>You Own</th>
        <th>Buy</th>
   </tr>
 <?php while ($row1 = mysql_fetch_assoc($result1)): ?>
 <tr>
        <th><?php echo $row1['Units'] ;?></th>
    <th><?php echo $row1['AtkHp'] ;?></th>
        <th><?php echo $row1['Buyfor'] ;?></th>
    <th><?php echo $row1['Sellfor'] ;?></th>
        <th><?php echo $my['swordmen'] ?></th> <--- this needs to be 3 diffrent datatables (swordmen, macemen, pikemen---|
    <th>
        <font color="black" valign= "top"><input style='width:45;height:20' type="text" name="input ITD1" size="250" class="textbox" value=""></font>
        <input style='width:45;height:30;font-weight:bold' name="submit" type="submit" class="submit" value="Buy!">
    </th>
   </tr>
 <?php endwhile; ?>
 </table>
 
 
as u see i dont think ure solution makes any diffrent besides giving me 3 new rows
ohh i forgot to mension that the "<th><?php echo $my['swordmen'] ?></th> <--- this needs to be 3 diffrent datatables (swordmen, macemen, pikemen---|" is from a diffrent database this is within the database "konto" and the rest from a diffrent possition =)

and it needs to collect from the 3 diffrent rows swordmen, macemen, pikemen
sorry about this
User avatar
Goofan
Forum Contributor
Posts: 305
Joined: Wed Nov 04, 2009 2:11 pm
Location: Sweden

Re: Need a loop that gets from diffrent datacells or a solution!

Post by Goofan »

haha i made a misstake when i wrote in "ure code" but i made it work now! :D SUPER THANKS!! gonna rate u forever man been waiting for this code in like 3 diffrent forums and for 3 days :D still i love this forum the most it helps fast and it got quality help =) =)=)=)=)=)=)=)=) SUPER THANKS


.... cant rate here =( to bad!
Post Reply