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
$des = "He
preg_replace('/[^a-zA-Z0-9\s]/', '',$string) this is using for removing special character only rather than space between the strings.
preg_replace('/[^a-zA-Z0-9\s]/', '',$string)