Welcome to WebmasterWorld Guest from 54.226.242.132

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

eregi replace Question

     
10:10 pm on Dec 18, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 30, 2003
posts:57
votes: 0


Hey all

I have a string - let's say that it's:

My name is "Sam".

I am trying to get rid of the quotation marks around Sam, so that it will read:

My name is Sam.

However I am having trouble accomplishing this.

I am trying things like:

$title = eregi_replace("\"", "", $title);

But it's throwing off errors messages. Anyone know how to accomplish this?

Regards

Dave

10:12 pm on Dec 18, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 11, 2006
posts:481
votes: 0


Hi,

I'd suggest using str_replace [php.net] instead, you don't need regular expressions for something this simple.

Andrew