So I have a table that has a row of URLs in it, some of the rows do not have any data in them.
When outputting the data to a page, how can I make it so that the code where that url should appear dissapears from the page?
This is the code I'm using:
Quote:
<strong><a href="<?php echo $One; ?>">One</a></strong> |
<strong><a href="<?php echo $Two; ?>">Two</a></strong> |
<strong><a href="<?php echo $Three; ?>">Three</a></strong> |
<strong><a href="<?php echo $Four; ?>">Four</a></strong></p>
|
One, Two, Three & Four are all links to our product on a specific online store, I'm thinking its something to do with either and "if" or an "echo" statement(?) but I cant seem to figure out the right code to get it working.
Basically, if the row for 'Two' has no data in it, how do i get it to just vanish from the 4 options?
So instead of:
One | Two | Three | Four
It shows:
One | Three | Four
The data calls are in an array at the top of the page if that helps any?