From 6cbc7c98b0bf4acda87bcc24ad8cb5578591c2d4 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Tue, 11 Jul 2000 20:19:01 +0000 Subject: [PATCH] Docs for substr_count(). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28148 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/strings.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/functions/strings.xml b/functions/strings.xml index 6c2fdb3e91..97a6fd53c9 100644 --- a/functions/strings.xml +++ b/functions/strings.xml @@ -2567,6 +2567,37 @@ $rest = substr ("abcdef", 1, -1); // returns "bcde" + + + substr_count + Count the number of substring occurrences + + + Description + + + int substr_count + string haystrack + string needle + + + + substr_count returns the number of times the + needle substring occurs in the + haystack string. + + + + + <function>substr_count</function> example + +print substr_count("This is a test", "is"); // prints out 2 + + + + + + substr_replace