Searching partial strings PHP

后端 未结 3 1786
我寻月下人不归
我寻月下人不归 2021-02-09 06:25

How can you search a partial string when typing (not to use MySQL) like the LIKE function in MySQL but using PHP when searching a string, e.g.



        
3条回答
  •  花落未央
    2021-02-09 07:03

    strstr() / stristr() (the latter being case-insensitive)

    if(strstr($string,$find)!==false){
        //true
    } 
    

提交回复
热议问题