homepage Welcome to WebmasterWorld Guest from 23.20.63.27
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
eregi replace Question
sysdomatic




msg:3810726
 10:10 pm on Dec 18, 2008 (gmt 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

 

Little_G




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

Hi,

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

Andrew

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved