# How to remove/suppress double quotation amrks from PHP Mysql driver database

**URL:** <https://forum.kirupa.com/t/how-to-remove-suppress-double-quotation-amrks-from-php-mysql-driver-database/297162>\
**Category:** flash\
**Created:** [September 26, 2009, 4:03pm UTC](https://forum.kirupa.com/t/how-to-remove-suppress-double-quotation-amrks-from-php-mysql-driver-database/297162 "2009-09-26T16:03:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hagop](https://avatars.discourse-cdn.com/v4/letter/h/97f17d/32.png) [@hagop](https://forum.kirupa.com/u/hagop)\
**Post date:** [September 26, 2009, 4:03pm UTC](https://forum.kirupa.com/t/how-to-remove-suppress-double-quotation-amrks-from-php-mysql-driver-database/297162/1 "2009-09-26T16:03:12Z")

</div>

Hi Kirupians

I have a Mysql database which has data with double quotation marks.  
I retreive the data using PHP in XML format (doesn’t matter if its AS2 or AS3) using the PHP functions below

$result = mysql\_query(“SELECT productid, www, FROM products WHERE product LIKE '%”.$key."%’");

echo ‘\<?xml version=“1.0” encoding=“UTF-8”?\>’;  
echo ‘\<datapacket\>’;  
while($row=mysql\_fetch\_array($result)){  
\*\*\* $line = ‘\<row productid="’.$row[productid].’" www="’.$row[www].’" /\>’; \*\*\*  
echo $line;

if the field www contains qutation marks ie:“I love you” nothing is returned because  
_**$line = ‘\<row productid="’.$row[productid].’" www="’.$row[www].’" /\>'**_ is violated with extra quotation marks.

Therefore I have to suppress the quotation marks.  
How can I do it?  
I tried [COLOR=red]str\_replace[/COLOR] command by adding an Escape character[COLOR=red] [SIZE=4][/SIZE][/COLOR] but no luck  
$row[www] = str\_replace(’"’, ’ " ', $row[www]);

Thanks  
Hagop
