On 23 Nov 2004 14:00:08 -0800,
Ph**********@photoshot.com (Janey)
wrote:
I want to be able to strip any character that is does not appear in
the following list from a text string:
$LegalChars="\"!#$%&'()*+,-.\\/0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~";
And conververt the following:
£ to £
€ to €
‘ to '
' to '
" to "
" to "
• to •
So, if the input string was:
$Input = "Andrés says "...the € is very useful"";
The out at is generated is:
$Output = "Andres says "...the € is very useful"";
(I've marked the changes in red above)
Could anyone write me a little function that can do this?
Write you? Hah.
check out str_replace and write it yourself.
Many thanks
--
gburnore@databasix dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division | Official Proof of Purchase
================================================== =========================
Want one? GET one!
http://signup.databasix.com
================================================== =========================