View Single Post
Old 04-11-2022, 03:31 PM  
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,094
Hi,

You can put a simple IF before each row

Quote:
<?php if($One) { ?> <strong><a href="<?php echo $One; ?>">One</a></strong> | <?php } ?>
<?php if($Two) { ?> <strong><a href="<?php echo $Two; ?>">Two</a></strong> | <?php } ?>
<?php if($Three) { ?> <strong><a href="<?php echo $Three; ?>">Three</a></strong> | <?php } ?>
etc

You can also use trim($var) and strlen($var) > 0 if there is a chance that your DB has rows with only spaces by mistake.

'The data calls are in an array at the top of the page if that helps any?'

If you have everything in your array, you can simply use the function implode() and you are good to go.

Show me a print_r of your array and I can help you further.

Cheers,
z
zerovic is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote