Reputation: 3289
Is there a better way to show hyper links in php than using
<a href="<?php echo $link; ?>"><?php echo $link; ?></a>
Upvotes: 0
Views: 748
Reputation: 6159
To avoid repeating $link, you can use this:
<?php printf('<a href="%1$s">%1$s</a>', $link); ?>
Upvotes: 3