Perchè scomodare le espressioni regolari quando esiste http://www.php.net/substr_count