×
Home About Us Products Services News Free Scripts Contact
news php scripts and software

PHP example - How to count the number of substring occurencies?


PHP - How to count the number of substring occurencies?

You may use the special PHP function substr_count
 
<?php
 
$myText=" the car is red  ";
 
echo substr_count($myText,"is");
 
?>
 
will display:
 
2

Category: PHP

 
<< Go back