Se trovate qcCodice PHP:
function checkString($string)
{
$check = false;
if(!ereg("(^[a-zA-Z0-9]+([a-zA-Z\_0-9\,]{3,12}))$",$string))
{
$check = true;
}
$array = explode(",",$string);
$count = count($array)-1;
if(count($array)<2)
{
$check = true;
}
if(empty($array[$count]))
{
$check = true;
}
foreach($array as $row)
{
if((strlen($row)>3) || (strlen($row)<1))
{
$check = true;
return $check;
}
}
return $check;
}
var_dump(checkString("pi,oo,#p"));
o qc di meglio
postate postate postate ........
![]()