i'm using the following - and have tried various combinations but the " in the database is not being converted the ' is being replaced correctly though function parseToXML1($htmlStr) { $xmlStr=str_replace('"','& #039;',$htmlStr); $xmlStr=str_replace("'",'& #039;',$htmlStr); return $xmlStr; } Code (markup): (ive deliberatly put a space in this post here: '& #039;' )
Yeah careless $xmlStr=str_replace('"','& #039;',$htmlStr); $xmlStr=str_replace("'",'& #039;',$xmlStr); PHP: