W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: PHP tags within a link

From: Daniel Biddle <deltab@osian.net>
Date: Fri, 24 Nov 2000 19:19:34 +0000 (UTC)
To: "Ian M. Evans" <ianevans@digitalhit.com>
cc: html-tidy@w3.org
Message-ID: <Pine.LNX.4.21.0011241909300.20651-100000@charizard.blazingfast.net>
On Fri, 24 Nov 2000, Ian M. Evans wrote:

> Just wondering how to handle the insertion of PHP variables or scripts that
> occur within a link.
> For example:
> <a
> href="http://digitalhit.master.com/texis/master/search/mysite.html?q=<?php
> echo $celebsearch; ?>">
> Is there anything I can do to stop tidy touching the <?php and ?> within a
> link? It leaves them alone properly outside a link.

Don't do that then!

Seriously, don't use php inside a tag, but replace the whole tag:

<?php echo '<a href="http://digitalhit.master.com/texis/master/search/'
        . 'mysite.html?q=$celebsearch">'; ?>

Of course this needs the end tag, and possibly the contents of the
element, to also be generated by php, or tidy will complain about
mismatched tags.

hope this helps,
Daniel Biddle <deltab@osian.net>
Received on Friday, 24 November 2000 14:22:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:49 UTC