Added example of offsets.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@147652 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ken 2004-01-01 22:53:19 +00:00
parent 0fe355c553
commit a5ee6bad2f

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.8 -->
<refentry id="function.strpos">
<refnamediv>
@ -50,6 +50,9 @@ if ($pos === false) {
echo " and exists at position $pos";
}
// We can search for the character, ignoring anything before the offset
$newstring = 'abcdef abcdef';
$pos = strpos($newstring, 'a', 1); // $pos = 7, not 0
?>
]]>
</programlisting>