--- "W. Smith" <[EMAIL PROTECTED]> wrote:

> I don't understand, I am trying to remove apostrophies in the text:
> 
> '
> 
> how can I add that to the items to be removed without causing an 
> error?
> 
> Thanks!
> Wretha

You will have to be more specific about what error you are obtaining.  However, 
from a previous
post you show a line of code:

$remove = array('?', '!', '%', '&', '(', ')', '"', '@', '/', '$', ',', ';', 
':', '*', '#', '"',
'"', '=', '+', '-');

I'm not sure why you have '"' three times in the remove array.  One time should 
suffice.  The
array values can be surrounded by single or double quotes.  Perhaps this will 
work for you:

$remove = array('?', '!', '%', '&', '(', ')', '"', '@', '/', '$', ',', ';', 
':', '*', '#', '=',
'+', '-', "'");

Note that I removed two instances of '"' and added "'" at the very end of the 
array.

I'd probably do this with regular expressions but the method given to you will 
work and may be
slightly faster.  With regular expressions you can indicate the characters you 
allow and delete
all of the others.

James
_____


James D. Keeline
http://www.Keeline.com  http://www.Keeline.com/articles
http://Stratemeyer.org  http://www.Keeline.com/TSCollection

http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc.
Spring Semester January-June 2006.  Two new class topics.


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to