if (strstr ($string_to_search, "'")!==false){ //Yup, they typed it. }else{ //Nope, they didn't type it. }