mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Docs for substr_count().
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28148 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
232bf9c194
commit
6cbc7c98b0
1 changed files with 31 additions and 0 deletions
|
@ -2567,6 +2567,37 @@ $rest = substr ("abcdef", 1, -1); // returns "bcde"
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.substr-count">
|
||||
<refnamediv>
|
||||
<refname>substr_count</refname>
|
||||
<refpurpose>Count the number of substring occurrences</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>substr_count</function></funcdef>
|
||||
<paramdef>string <parameter>haystrack</parameter></paramdef>
|
||||
<paramdef>string <parameter>needle</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>substr_count</function> returns the number of times the
|
||||
<parameter>needle</parameter> substring occurs in the
|
||||
<parameter>haystack</parameter> string.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title><function>substr_count</function> example</title>
|
||||
<programlisting>
|
||||
print substr_count("This is a test", "is"); // prints out 2
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.substr-replace">
|
||||
<refnamediv>
|
||||
<refname>substr_replace</refname>
|
||||
|
|
Loading…
Reference in a new issue