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:
Andrei Zmievski 2000-07-11 20:19:01 +00:00
parent 232bf9c194
commit 6cbc7c98b0

View file

@ -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>