输入banner图图片脚本导航/分类

php如何判断字符串是否存在

例子,使用 === or !== 判断字符串存在与否。

代码:

  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!’);}