Modifying design based upon what's seen in list pages

2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 20, 2011   (RSS)

By (Deleted User) - April 19, 2011

I have a list page that shows the complete address of each list item such as
<div><?php echo $record['city'] ?>, <?php echo $record['state_province'] ?> &nbsp; <?php echo $record['postcode'] ?> &nbsp; <?php echo $record['country'] ?></div>

But, not every record shows all of these details.

So where one record might say
Beverly Hills, CA 90210 United Sates

another listing might just read
United States

How can I get the comma, spacing etc that I've created in the design to not appear if all of the details do not appear.

Thank you!