On Fri, Jul 25, 2008 at 1:08 PM, Shelley <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> 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
>
Is it possible for you to use a mixture of html_entity_decode, htmlentities
e.g.
<?php
$content = html_entity_decode('>, & good morning<');
echo '<p>hi <strong>Richard</strong>'.htmlentities($content).'</p>';
/James