note 105914 deleted from function.substr-count by danbrown
| From: | danbrown@php.net | Date: | Mon, 26 Sep 2011 14:53:38 +0000 |
| Subject: | note 105914 deleted from function.substr-count by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183444@lists.php.net to get a copy of this message | ||
Note Submitter: Jim at terrys dot net
----
<?php
function substr_count_array( $haystack, $needle ) {
$count = 0;
foreach ($needle as $substring) {
$count += substr_count( $haystack, $substring);
}
return $count;
}
?>