|
From: Shelley on 25 Jul 2008 07:12 Hi all, How can I make a string with & (NOT &, >, < or "), <, > xml compatible? What is the expression to use? Thank you very much. -- Regards, Shelley
From: "Richard Heyes" on 25 Jul 2008 07:53 > How can I make a string with & (NOT &, >, < or "), <, > xml > compatible? > What is the expression to use? Not entirely sure what you're after (try posting some before and after snippets), but by the sounds of it you don't need a regular expression - strtr() will work for you. Or str_replace(). -- Richard Heyes http://www.phpguru.org
From: Shelley on 25 Jul 2008 08:08 Hi Richard, Not exactly actually. What I mean is: Before: <p>hi <strong>Richard</strong>>, & good morning<</p> After: <p>hi <strong>Richard</strong>>, & good morning<</p> I hope it's clear now. On Fri, Jul 25, 2008 at 7:53 PM, Richard Heyes <richard.heyes(a)gmail.com> wrote: > > How can I make a string with & (NOT &, >, < or "), <, > > xml > > compatible? > > What is the expression to use? > > Not entirely sure what you're after (try posting some before and after > snippets), but by the sounds of it you don't need a regular expression > - strtr() will work for you. Or str_replace(). > > -- > Richard Heyes > http://www.phpguru.org > -- Regards, Shelley
From: Micah Gersten on 25 Jul 2008 15:30 Are you trying to make it xml compatible or XHTML compatible? '&' is not valid HTML or XHTML as it has special meaning. If you want it to adhere to the standard and display correctly, you must use '&' Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Shelley wrote: > Hi Richard, > > Not exactly actually. > > What I mean is: > Before: <p>hi <strong>Richard</strong>>, & good morning<</p> > After: <p>hi <strong>Richard</strong>>, & good morning<</p> > > I hope it's clear now. > > On Fri, Jul 25, 2008 at 7:53 PM, Richard Heyes <richard.heyes(a)gmail.com> > wrote: > > >>> How can I make a string with & (NOT &, >, < or "), <, > >>> >> xml >> >>> compatible? >>> What is the expression to use? >>> >> Not entirely sure what you're after (try posting some before and after >> snippets), but by the sounds of it you don't need a regular expression >> - strtr() will work for you. Or str_replace(). >> >> -- >> Richard Heyes >> http://www.phpguru.org >> >> > > > >
From: Shelley on 25 Jul 2008 23:24 Ok, let me tell you what i want to achieve. I want to transfer users' blog onto mobile phone, so I should convert characters such as >, <, & (but not &, or >, or <, etc) into xml compatible ones, >, < &. Maybe there is some problem in my expression? Waiting for your response... On Sat, Jul 26, 2008 at 3:30 AM, Micah Gersten <micah(a)onshore.com> wrote: > Are you trying to make it xml compatible or XHTML compatible? '&' is > not valid HTML or XHTML as it has special meaning. If you want it to > adhere to the standard and display correctly, you must use '&' > > Thank you, > Micah Gersten > onShore Networks > Internal Developer > http://www.onshore.com > > > > Shelley wrote: > > Hi Richard, > > > > Not exactly actually. > > > > What I mean is: > > Before: <p>hi <strong>Richard</strong>>, & good morning<</p> > > After: <p>hi <strong>Richard</strong>>, & good morning<</p> > > > > I hope it's clear now. > > > > On Fri, Jul 25, 2008 at 7:53 PM, Richard Heyes <richard.heyes(a)gmail.com> > > wrote: > > > > > >>> How can I make a string with & (NOT &, >, < or "), <, > > >>> > >> xml > >> > >>> compatible? > >>> What is the expression to use? > >>> > >> Not entirely sure what you're after (try posting some before and after > >> snippets), but by the sounds of it you don't need a regular expression > >> - strtr() will work for you. Or str_replace(). > >> > >> -- > >> Richard Heyes > >> http://www.phpguru.org > >> > >> > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- With best regards, Shelley Shyan http://phparch.cn
|
Next
|
Last
Pages: 1 2 Prev: URL Rewrite not working for me Next: Code works alone but not with other code. |