cvs: phpdoc /en/reference/strings/functions substr.xml

From: Date: Fri, 06 Jun 2008 11:21:10 +0000
Subject: cvs: phpdoc /en/reference/strings/functions substr.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1765@lists.php.net to get a copy of this message
felipe Fri Jun 6 11:21:10 2008 UTC Modified files: /phpdoc/en/reference/strings/functions substr.xml Log: - Changed example to use square brackets http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/strings/functions/substr.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc/en/reference/strings/functions/substr.xml diff -u phpdoc/en/reference/strings/functions/substr.xml:1.16 phpdoc/en/reference/strings/functions/substr.xml:1.17 --- phpdoc/en/reference/strings/functions/substr.xml:1.16 Tue Apr 22 20:37:58 2008 +++ phpdoc/en/reference/strings/functions/substr.xml Fri Jun 6 11:21:10 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.substr"> <refnamediv> <refname>substr</refname> @@ -125,11 +125,11 @@ echo substr('abcdef', -1, 1); // f // Accessing single characters in a string -// can also be achieved using "curly braces" +// can also be achieved using "square brackets" $string = 'abcdef'; -echo $string{0}; // a -echo $string{3}; // d -echo $string{strlen($string)-1}; // f +echo $string[0]; // a +echo $string[3]; // d +echo $string[strlen($string)-1]; // f ?> ]]>

« previous php.doc.cvs (#1765) next »