My table HTML/CSS is awful -- I always have to look at examples -- but my guess is to run two IF statements for each set of data, one IF to write the title and another IF to write the value. Since no titles will be written for empty values and no values written for empty values, the table will shrink and expand appropriately.
Substitute/use the bits below into/with proper table HTML/CSS and you should be golden.
TITLES
<?php
if ($products_measurements != '') {
?>
<strong>Measurements (in cm): </strong>
<?php
}
?>
<?php
if ($products_materials != '') {
?>
<strong>Materials: </strong></div>
<?php
}
?>
<?php
if ($products_maintenance != '') {
?>
<strong>Maintenance: </strong>
<?php
}
?>
VALUES
<?php
if ($products_measurements != '') {
?>
<?php echo $products_measurements; ?>
<?php
}
?>
<?php
if ($products_materials != '') {
?>
<?php echo $products_materials; ?>
<?php
}
?>
<?php
if ($products_maintenance != '') {
?>
<?php echo $products_maintenance; ?>
<?php
}
?>
Bookmarks