Nested Repeats

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

Post Reply
Red Blaze
Forum Commoner
Posts: 40
Joined: Mon Mar 27, 2006 3:45 pm

Nested Repeats

Post by Red Blaze »

Hello again! :D
I'm having a certain issue that I'm not sure how to get around. This is the piece of code I'm working with:

Code: Select all

<?php do { ?>
	      <table cellspacing="0" cellpadding="2">
	        <tr>
	          <td align="center"><img src="<?php echo $images_dir ?>/tb_<?php echo $row_callitems['itemname']; ?>" /><br />
              <?php echo $row_callitems['itemname']; ?></td>
            <td valign="top"><table cellspacing="0" cellpadding="2">
              <tr>
                <td>Size</td>
                <td>Paper</td>
                <td>Quantity</td>
                <td>Unit Price </td>
                <td>Subtotal</td>
              </tr>
<!--Start Repeat -->
              <tr>
                <td><?php echo $row_callitem_size['size']; ?></td>
                <td><?php echo $row_callitem_size['paper']; ?></td>
                <td><?php echo $row_callitem_size['quantity'];?></td>
                <td><?php ?></td>
                <td><?php ?></td>
              </tr>
<!--End Repeat -->
              </table></td>
          </tr>
          </table>
	      <?php } while ($row_callitems = mysql_fetch_assoc($callitems)); ?>
I'm using dreamweaver due to my lack of PHP Knowledge without it. As you see, I already have a repeat region. Do you see where it says "<!--Start Repeat-->"? That's another repeat row I plan to do, but it won't allow me to. How can I get around it to display the rest of the records?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's hard to tell from the little code you've posted.
Post Reply