$text=str_replace("\n","",$text); $text = preg_replace('/\-\-.+\-\-/Us', '', $text); $text = preg_replace('/\/\*.+\*\//Us', '', $text);