Devilfish
Nov 24th 2008, 8:40 pm
Hi folks,
Can someone tell me what the php equivalent of <a href=""></a> is please?
Thanks :)
elias_sorensen
Nov 24th 2008, 11:34 pm
There's none.
PHP is a server-side language, and will not make any code the user can interact with, since all parsing is done before the user gets the output.
If you write:
<?
if($_GET[test] == "yes"){
echo "YES";
}else{
echo "NO";
}
?>
You wouldn't see that code if you're viewing the page source.
if you just go to filename.php, it will say "NO" in the source, if you visit filename.php?test=yes, it will say "YES" in the source.
You're not able to see if(....) etc, because that parsing is done server-side.
To write a link to the html, you would simply use:
echo '<a href="something">Visit my website</a>';
joxtechnology
Nov 25th 2008, 11:40 pm
there's no equivalent code. if your going to create a link in php you'll also use that tag.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.