Re: [PHP] ampersands in href's

2005-06-05 Thread Rory Browne
I actually forgot that &'s are supposed to be &'ed when putting them into SGML(HTML . XML, etc). I retract my previous statments on the matter. On 6/4/05, Jack Jackson <[EMAIL PROTECTED]> wrote: > > > Rory Browne wrote: > > On 6/4/05, Jack Jackson <[EMAIL PROTECTED]> wrote: > > > >>Hi, Rory > >

Re: [PHP] ampersands in href's

2005-06-05 Thread Jochem Maas
Marek Kilimajer wrote: Jack Jackson wrote: Murray @ PlanetThoughtful wrote: If I want to make a link to a URL which includes some GETs can I just do: ... You should use & for all document types, not only xhtml AFAICR the specification[s] go[es] further than that. all relevant ch

Re: [PHP] ampersands in href's

2005-06-05 Thread Jack Jackson
Thanks! Leon Poon wrote: The simplest way to make sure everything work well regardless of what the values are: "; ?> htmlspecialchars() changes characters '&', '"', ''', '<', '>' into the HTML equivilant. And yup, you should do this for all *ML pages as long as the thing being printed is no

Re: [PHP] ampersands in href's

2005-06-04 Thread Leon Poon
The simplest way to make sure everything work well regardless of what the values are: "; ?> htmlspecialchars() changes characters '&', '"', ''', '<', '>' into the HTML equivilant. And yup, you should do this for all *ML pages as long as the thing being printed is not part of the mark-up synta

Re: [PHP] ampersands in href's

2005-06-04 Thread Jack Jackson
Rory Browne wrote: On 6/4/05, Jack Jackson <[EMAIL PROTECTED]> wrote: Hi, Rory Rory Browne wrote: I think you have the idea. The &'s are used to seperate the various variables. If you want to set $p to something like 'Tom & Jerry' then personally I'd do something like: That's nice. To

Re: [PHP] ampersands in href's

2005-06-04 Thread Marek Kilimajer
Jack Jackson wrote: Murray @ PlanetThoughtful wrote: If I want to make a link to a URL which includes some GETs can I just do: Depends very much on the document type of your page. Valid XHTML (transitional, at least), for example, doesn't like single ampersands in href=> links. For XH

Re: [PHP] ampersands in href's

2005-06-04 Thread Jack Jackson
Murray @ PlanetThoughtful wrote: If I want to make a link to a URL which includes some GETs can I just do: Depends very much on the document type of your page. Valid XHTML (transitional, at least), for example, doesn't like single ampersands in links. For XHTML, you need to replace "&"s wi

Re: [PHP] ampersands in href's

2005-06-04 Thread Rory Browne
On 6/4/05, Jack Jackson <[EMAIL PROTECTED]> wrote: > Hi, Rory > > Rory Browne wrote: > > I think you have the idea. The &'s are used to seperate the various > > variables. If you want to set $p to something like 'Tom & Jerry' then > > personally I'd do something like: > > > > > > > $p = "Tom & Je

RE: [PHP] ampersands in href's

2005-06-04 Thread Murray @ PlanetThoughtful
> If I want to make a link to a URL which includes some GETs can I just do: > > > or must I escape the ampersand somehow? Depends very much on the document type of your page. Valid XHTML (transitional, at least), for example, doesn't like single ampersands in links. For XHTML, you need to repl

Re: [PHP] ampersands in href's

2005-06-04 Thread Jack Jackson
Hi, Rory Rory Browne wrote: I think you have the idea. The &'s are used to seperate the various variables. If you want to set $p to something like 'Tom & Jerry' then personally I'd do something like: $p = "Tom & Jerry"; $s = "Cat & Mouse"; printf(" That's nice. To get more specific (becau

Re: [PHP] ampersands in href's

2005-06-04 Thread Rory Browne
I think you have the idea. The &'s are used to seperate the various variables. If you want to set $p to something like 'Tom & Jerry' then personally I'd do something like: On 6/4/05, Jack Jackson <[EMAIL PROTECTED]> wrote: > Hi, > > If I want to make a link to a URL which includes some GETs can

[PHP] ampersands in href's

2005-06-04 Thread Jack Jackson
Hi, If I want to make a link to a URL which includes some GETs can I just do: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php