Search code examples
xmlstripslashes

stripslashes and special characters?


My xml feed file is using stripslashes, but I also want to remove special characters from som fields - how would I do that and where/what order would I add it?

$output .= "<address>".htmlentities(html_entity_decode(stripslashes($row->street_num)))." ".htmlentities(html_entity_decode(stripslashes($row->address2)))."</address>\n";

Solution

  • See: In php, Prepare string and create XML/RSS Feed