Special HTML for ASCII

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

Suppose I have a 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 thing I wanted to do was make a function where hardcodes replace all HTML, search every line for codes and replace, but it ends up being a lot of code. :)

0


source to share


2 answers


I think you want html_entity_decode



+4


source


Is there a reason why you can't just execute RegEx (or some other tool) to find and replace for "(;)"?



+1


source







All Articles