RE: [PHP] replacing & but not special chars
| From: | Ford, Mike [LSS] | Date: | Mon, 28 Jul 2003 09:38:18 +0000 |
| Subject: | RE: [PHP] replacing & but not special chars | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-157148@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Shawn McKenzie [mailto:nospam@mckenzies.net]
> Sent: 27 July 2003 08:36
>
> I have some URLs in hrefs that have an &. This does not
> validate HTM4.01
> transitional, so I want to replace them with &
>
> So I buffer the output and do a replace, but suppose there is
> already an
> & then I get & or if I have anything else like
> " then I get
> "
Why can't you just put & in the href string? Seems like the simplest
way to me.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211