Skip to content
Advertisement

Strip out HTML and Special Characters

I’d like to use any php function or whatever so that i can remove any HTML code and special characters and gives me only alpha-numeric output

JavaScript

I want the output become Hello world it s me and love you (just Aa-Zz-0-9-WhiteSpace)

I’ve tried strip_tags but it removes only HTML codes

JavaScript

So is there any way to do it?

Advertisement

Answer

Probably better here for a regex replace

JavaScript

Or, in one go

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement