Strip out HTML and Special Characters

后端 未结 9 1312
别跟我提以往
别跟我提以往 2020-12-07 12:39

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         


        
9条回答
  •  庸人自扰
    2020-12-07 13:24

    to allow periods and any other character just add them like so:

    change: '#[^a-zA-Z ]#' to:'#[^a-zA-Z .()!]#'

提交回复
热议问题