I am looping thru an array putting 3 of the values in a row using my <div>
but my problem is if the last row has only 1 or 2 values its not closing
properly.
 
<?php
        $i = 0;
        $rowmax = 3;
        $rowcount = 0; ?>
 
        <fieldset>
                <div class="single">
          
           <?php foreach ($skills as $skill): ?>
          
                        <div class="trio">
               
                    <?php 
                         // 1, 2, 3
                    
                    $i++;
                    $rowcount++;
                    
                    if ($rowcount == $rowmax):?>
               
                        </div>
                </div>
                   
        </fieldset>
          
        <fieldset>
                <div class="single">
                    
    
    <?php $rowcount = 0;?>
    
   <?php else :?>
   </div>
  <?php endif ?>
 
      <?php endforeach; ?>


Here if the last row only has 1 or 2 the <div class="single"> and <fieldset>
are not closed off sinces it waiting for the 3rd to close out the group.

Any ideas here?

Thanks
 
Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to