<?php
$mystring = mb_strtolower($_POST['text']);
$findme = "1";
$pos1 = strpos($mystring, $findme);
$findme = "2";
$pos2 = strpos($mystring, $findme);
$findme = "3";
$pos3 = strpos($mystring, $findme);
if ($pos1 === false or $pos2 === false or $pos3 === false) {
echo "OK";
}
else{
echo "Ошибка";
}
function if_str($str, $arr){
foreach($arr as $val){
if(substr($str, $val)!==false){
return true;
}
}
return false;
}
if(if_str("1234545", array(1, 2, 3))){
echo "OK";
}