PHP determines whether a string exists PHP string detection code

WBOY
Release: 2016-07-25 09:11:50
Original
1032 people have browsed it

php determines whether the string is stored

Solution: Use === or !==

Full code:

  1. if(stripos($sql, "insert") === 0){
  2. $excuteResult = mysql_query($sql);
  3. if($excuteResult){
  4. $sql = $ sql2."where id = (select max(id) from subway2)";
  5. }
  6. } else if(stripos($sql, "delete") === 0 || stripos($sql, "update") == = 0){
  7. if (strpos($foo, “my”)===0) { echo('I find!');}
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template