Question

Hey, is there any built in functions or something like that in php that will allow me to turn HTML special code like: <(;), >(;), Á(;) and ©(;) etc... into <, >, Á and ©

Lets say I have the value:

$fileName = "Gibt es eine schö(;)ne Offroadstrecke? (;)";

And I want this:

$fileName = "Gibt es eine schöne Offroadstrecke? ";

Any easy way to do this with php? The first I though of was to make a function that hard codes replaceing all of the HTML, search each string for the codes and replace but that is a whole lot of code in the end. :)

Was it helpful?

Solution

I think you want html_entity_decode

OTHER TIPS

Is there a reason you can't simply do a RegEx (or some other tool) to search and replace for "(;)" ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top