mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
0fe355c553
commit
a5ee6bad2f
1 changed files with 4 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue