Hello I have a scenario that, in textbox I can enter string like
"1,2,3" this would be allowed.
but if someone enters,
"1,2,,3" this would not be allowed.
allowed multiple commas but not like above.
Thanks in advance
Hello I have a scenario that, in textbox I can enter string like
"1,2,3" this would be allowed.
but if someone enters,
"1,2,,3" this would not be allowed.
allowed multiple commas but not like above.
Thanks in advance
Try this,
if(in_array("", explode(',',$str)))
{
// validation fail
}