kennyt Thu Jan 1 17:53:19 2004 EDT
Modified files:
/phpdoc/en/reference/strings/functions strpos.xml
Log:
Added example of offsets.
Index: phpdoc/en/reference/strings/functions/strpos.xml
diff -u phpdoc/en/reference/strings/functions/strpos.xml:1.4
phpdoc/en/reference/strings/functions/strpos.xml:1.5
--- phpdoc/en/reference/strings/functions/strpos.xml:1.4 Wed May 28 08:00:30
2003
+++ phpdoc/en/reference/strings/functions/strpos.xml Thu Jan 1 17:53:19 2004
@@ -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 @@
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>