Forum Moderators: coopster

Message Too Old, No Replies

need to remove an apostrophe ‘ from a string

remove an apostrophe from a string

         

Mitch888

1:49 am on Jan 22, 2004 (gmt 0)

10+ Year Member



Hello,

I am trying to remove an apostrophe ‘ from a string in a variable.

$address = “O'Meara”;

how can I make $address = “OMeara”;

Any help would be greatly appreciated

thank you

tstaheli

2:28 am on Jan 22, 2004 (gmt 0)

10+ Year Member



$newaddress = str_replace("'", "", "$address");

That should work, for other answers visit [php.net...]

Mitch888

2:36 pm on Jan 22, 2004 (gmt 0)

10+ Year Member



works like a charm. and excellent link. thank you