01 | <?php |
02 | $count = 0; // count start form zero |
03 | $string = "bugphp -free online tutorials bugphp.com bugphp bugphp.com bugphpbugphp bugphp" ; |
04 |
05 | foreach ( str_word_count ( $string ,1) as $a ) { |
06 | if ( strtolower ( $a ) == strtolower ( 'bugphp' ) ) { |
07 | $count ++; |
08 | } |
09 | } |
10 | echo "$count" ; |
11 | ?> |
No comments:
Post a Comment