Gibi bir dize "abc fox fox fox ghi xyz" nasıl ben günlerin tilki 'sayısını alabilirsiniz dize tekrarlanır?
substr_count() method is indeed very nice, but if you have more needs (for example to match only whole words) here is a regex version using preg_match_all() a> ve kelime sınırları:
$nb_of_matches = preg_match_all('/\bfox\b/', $subject);
Oldukça basit çok :-)