Re: Re: Stripping weird characters again...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I understand I need to do a string replace. 
 
Should I do it like so?

$search = array(chr(145),chr(146),chr(147),chr(148),chr(150),chr(151));
$replace = array("'","'",'"','"','-','-');

Is this what you mean?


Thank you,
-- 
Paul Nowosielski
Webmaster





On Monday 24 July 2006 16:12, Adam Zey wrote:
> Paul Nowosielski wrote:
> > Dear All,
> >
> > I'm having a problem replacing these bad characters from a feed.
> >
> > Example:
> > <description>The United Kingdom<92>s National Arena Association has
> > elected Geoff Huckstep, the current CEO of the National Ice Centre and
> > Nottingham Arena, as chairman.</description>
> >
> > The <92>is actually a single quote. I have these from some of the data
> > dumps. I can't figure out what exactly to strip.
> >
> > When I view the file in vi they appear like <92> <93> <94> (highlighted
> > in blue like controll characters.
> >
> > Can someone point me in the right direction to purge this from my feed?
> >
> >
> > Thank you,
> >
> > Paul Nowosielski
> > Webmaster
>
> You want str_replace with arrays as parameters.
>
> Regards, Adam Zey.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux