You might wanna make a function for links:
<?php
function makelink($descr, $href) {
global $printer;
if ($printer) {
$link = "$descr ($href)";
} else {
$link = "<a href=\"$href\">$descr</a>";
}
return $link;
}
To echo an link in a site, do:
html above
<?php
echo makelink("Offical PHP-site", "http://www.php.net");
?>
html under
contact.php will echo:
<a href="http://www.php.net">Offical PHP-site</a>
contact.php?printer=true will echo:
Offical PHP-site (http://www.php.net)
Hope this works!
Best Regards
Fredrik A. Takle
ElanIT
<[EMAIL PROTECTED]> wrote in message
BB6D932A42D6D211B4AC0090274EBB1D2EF03B@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1D2EF03B@GLOBAL1...
> I'm looking for a way to have a url for a link "explode" into the actual
url
> address. So for example, on a dynamically created webpage, I have a link
> called: Contact.
>
> When someone chooses to view the "printer friendly" version of this page,
I
> want the link on the the printer-friendly page to change to the following:
> "Contact (http://www.web.com/contact.html)".
>
> Any ideas of how to automate this process?
>
> Thank you, Shawna
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]