philip Tue May 27 20:28:35 2003 EDT Added files: /phpdoc/en/reference/strings/functions strripos.xml Log: Initial documentation.
Index: phpdoc/en/reference/strings/functions/strripos.xml +++ phpdoc/en/reference/strings/functions/strripos.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.strripos"> <refnamediv> <refname>strripos</refname> <refpurpose> Find position of last occurrence of a case-insensitive string in a string </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>strripos</methodname> <methodparam><type>string</type><parameter>haystack</parameter></methodparam> <methodparam><type>string</type><parameter>needle</parameter></methodparam> </methodsynopsis> <para> Returns the numeric position of the last occurrence of <parameter>needle</parameter> in the <parameter>haystack</parameter> string. Unlike <function>strrpos</function>, <function>strripos</function> is case-insensitive. Also note that string positions start at 0, and not 1. </para> <para> If <parameter>needle</parameter> is not found, &false; is returned. </para> &return.falseproblem; <para> <example> <title>A simple <function>strripos</function> example</title> <programlisting role="php"> <![CDATA[ <?php $haystack = 'ababcd'; $needle = 'ab'; $pos = strripos($haystack, $needle); if ($pos === false) { echo "Sorry, we did not find ($needle) in ($haystack)"; } else { echo "Congratulations!\n"; echo "We found the last ($needle) in ($haystack) at position ($pos)"; } /* Outputs: Congratulations! We found the last (ab) in (ababcd) at position (2) */ ?> ]]> </programlisting> </example> </para> <para> See also <function>strrpos</function>, <function>strrchr</function>, <function>substr</function>, and <function>stristr</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php