How to substr_count function works?

 Published April 23,2010 in PHP

int substr_count ( string haystack, string needle )
 

substr_count() returns the number of times the needle substring occurs in the haystack string. Please note that needle is case sensitive.

 

 

Example 1. substr_count() example

echo substr_count("This is a test", "is"); // prints out 2



Like our site? Be a member of Coolajax fan page to get daily posts updates!

recommended-tutorial You May Like This Posts!

» Best PHP Video Tutorials Part 2

» Displaying Information and Variables

» How to str_rot13 function work?

» How to stripslashes function work?

» How to str_pad Function work?

  tuts_view Total Read: 516
blog comments powered by Disqus

Topics

Coolajax Fans

coolajax fan page on Facebook