Remove &amp from string when writing to xml in PHP

Viewed 21229

I am trying to write into an XML file using DOMDocument a link that contains the & sign. When I try this, the link becomes & in the xml. So from product=1&qty;=1 becomes product=1&qty;=1.

Can you please tell me a way to avoid this?

2 Answers
Related