
Originally Posted by
SonnyCooL
when i try to use the target blank and ref no follow in php but it turn out some error ...
the code i use:
PHP Code:
<?php if ($pro_link == "") { ?> <?php } else { echo "<br /><br /><a href=".$pro_link." target="_blank" >rel="nofollow" <strong>Contact Buyer</strong></a>"; } ?>
error msg :
anyone can help ?
If you still wish a simple alternative I prefer using single qoute inside php echo
or you can remove the html completely out of the section
Your code
PHP Code:
<?php
if ($pro_link == "")
{
?> <?php
}
else
{
echo "<br /><br /><a href=".$pro_link." target="_blank" >rel="nofollow" <strong>Contact Buyer</strong></a>";
}
?>
my code
PHP Code:
<?php
if ($pro_link == "")
{
?> <?php
}
else
{
?>
<br /><br /><a href="<?php echo $pro_link; ?>" target="_blank" >rel="nofollow" <strong>Contact Buyer</strong></a>
<?php
}
?>
Hope this helps you or someone else
Bookmarks