This question already has an answer here:
$string = "oidjdssd , odi,jdois, 3089u,, oisdjsd";
How do i find out if theres more than 3 commas in the string above in the best way?
</div>
This question already has an answer here:
$string = "oidjdssd , odi,jdois, 3089u,, oisdjsd";
How do i find out if theres more than 3 commas in the string above in the best way?
</div>
I would suggest substr_count
. You can see if the result is >3
to see if there's more than three.