I have a database driven website. There is a basic template that is the format for each page. There are various parts that need to change for each different page. One line for an example is this.
<link rel="canonical" href="http://mywebsite.com/details.php?id=1" />
I changed the line code to this and stills it works fine and does exactly what I wanted it to do.
<link rel="canonical" href="<?php echo "$record->canonical";?>" />
The problem I am having is, when the cell is empty I am printing this line which is not need if the quotes are blank. How can I remove this line when the cell in my database is empty?
<link rel="canonical" href="" />