I'm trying to make an INSERT statement with data that has both quotes (") and apostrophes ('). So my data looks like this
Data 1:
Address: 123 Elm
City: Riverdale
State: MD
County: PRINCE GEORGE'S
Comment: This is a "Good" place
Data 2:
Address: 123 Elm
City: Stevensville
State: MD
County: QUEEN ANNE'S
Comment: This is another "Good" place
I tried building this statement:
do {
$Address = $row_place['Address'];
$City = $row_place['City'];
$State = $row_place['State'];
$County = $row_place['County'];
$Comment = str_replace('"','',$row_place['Comment'];) ///Remove quotes from Comment
$query = 'INSERT INTO places (`id`, `address`,`city`, `state`, `county`, comment`) VALUES (NULL, "$Address", "$City", "$State", "$County", "$Comment")'
} while($row_place = mysql_fetch_assoc($place)
But what happens is that $Address, $City, etc.. gets inserted. Not the data.