Reputation: 15583
i store my article in a xml file, so if i write into it special characters "'
xml automatically escapes this characters and when i get(via PHP) the xml content i get something like \"
. so if i write into xml "hello dude"
my html will look like this \"hello dude\"
how can i get the xml content like it was initially inserted("hello dude"
)? thanks
Upvotes: 0
Views: 2453
Reputation: 10872
html_entity_decode()
takes an html-encoded strings and removes escaping (e.g., <
into <
).
stripslashes()
unescapes slashes (e.g. \'
into '
).
Upvotes: 1
Reputation: 943564
You haven't specified how you are reading or outputting the data, but neither HTML nor XML use the \
character to escape anything.
You might have magic quotes turned on. I'd suggest turning it off, as it isn't very effective. You can hack around it with stripslashes.
Upvotes: 1