problems displaying list of bios - they're kind of 'nesting' inside each other

5 posts by 2 authors in: Forums > CMS Builder
Last Post: August 17, 2009   (RSS)

By gagester - August 17, 2009

NO IDEA what I'm doing wrong.

http://www.orthopedicsportscenter.com/staff.php

We're converting this site that was built a couple years ago into CMS Builder. I'm trying to incorporate the table that was originally used to 'display' the bios. (I know I should rebuild this correctly using css, etc.) But may need to do something similar with CMS builder later... so might as well TRY to figure it out. ;)

Any ideas what I'm doing wrong? I think it has to do with the <?php endif ?> and or <?php endforeach ?>

The bios are nesting inside of each other. Libby's pic and bio are furthest apart. Only the most recently added "stay connected".

I'm sure the fix is simple. But HELP! :)

Re: [gagester] problems displaying list of bios - they're kind of 'nesting' inside each other

By Chris - August 17, 2009

Hi gagester,

Can you please post the PHP source code for that page as an attachment so we can have a look at it?
All the best,
Chris

Re: [chris] problems displaying list of bios - they're kind of 'nesting' inside each other

By gagester - August 17, 2009 - edited: August 17, 2009

oh .. sure. (not the prettiest html, but it works.) ;)
Attachments:

staff.php 12K

Re: [gagester] problems displaying list of bios - they're kind of 'nesting' inside each other

By Chris - August 17, 2009

Hi gagester,

You have some unmatched tags between your (outermost) foreach and endforeach, specifically </td></tr></table></td></tr>. The page might look fine with one record displayed, but for every extra record you're going to be closing tables that aren't supposed to be closed.

Try moving your foreach on line 145 up a couple lines, between <table> and <tr>, and the endforeach on line 173 up six lines between </tr> and </table>.

Attached is a copy of your file with those changes made.

I hope this helps! Please let us know if you have any more questions or comments.
All the best,
Chris
Attachments:

staff2.php 12K