mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix comment on "bla array[index] " syntax
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@55587 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
15a63ed54b
commit
4f18ef3cf8
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.47 $ -->
|
||||
<!-- $Revision: 1.48 $ -->
|
||||
<chapter id="language.types">
|
||||
<title>Types</title>
|
||||
|
||||
|
@ -796,7 +796,9 @@ echo "He drunk some ${beer}s"; // works
|
|||
<informalexample>
|
||||
<programlisting role="php">
|
||||
$fruits = array( 'strawberry' => 'red' , 'banana' => 'yellow' );
|
||||
echo "A banana is $fruits[banana]."; // this works, but is wrong <link linkend="language.types.array.foo-bar">see the explanation</link>
|
||||
echo "A banana is $fruits[banana]."; // note that this works differently
|
||||
outside string-quotes. See <link
|
||||
linkend="language.types.array.foo-bar"><literal>$foo[bar]</literal> outside strings</link>
|
||||
echo "This square is $square->width meters broad.";
|
||||
echo "This square is $square->width00 centimeters broad."; // won't work,
|
||||
// for a solution, see the <link linkend="language.types.string.parsing.complex">complex syntax</link>.
|
||||
|
|
Loading…
Reference in a new issue