Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

removing quotes from a string

Status
Not open for further replies.

farley99

MIS
Joined
Feb 12, 2003
Messages
413
Location
US
How do i remove quotes from a string
my string is str="string"
$no_quotes=preg_replace("\"","",$str);
I want to make str=string

I do this and it give me this error...
Warning: No ending delimiter '"' found
 
The "no delimiter" error means you did not include the "/" delimiters in the search pattern.

Also, the use of single quotes can make this pattern easier to read.

Try:
$no_quotes=preg_replace('/"/',"",$str);

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top