How to put a hyperlink in PHP
Posted: Mon Jul 20, 2009 6:41 am
Sorry if this has already been brought up (couldn't find an answer anywhere).
I want to show a result obtained from a database within php, as a link, but the following line doesn't work.
NOTE: the result provided by {$row['LISTEN']} is an address, eg, "www.test.com/hello.html"
I can't get this method to work either.
How is a HTML hyperlink created within PHP code
I want to show a result obtained from a database within php, as a link, but the following line doesn't work.
NOTE: the result provided by {$row['LISTEN']} is an address, eg, "www.test.com/hello.html"
Code: Select all
echo " <td><a href="{$row['LISTEN']}" target="_blank">LINK</a></td>\n";Code: Select all
$link = {$row['LISTEN']}
echo " <td><a href="{$link}"LINK</a></td>\n";