mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Note about $array[banana] is bad!
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@55530 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
230a7539e1
commit
fa620da371
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.46 $ -->
|
||||
<!-- $Revision: 1.47 $ -->
|
||||
<chapter id="language.types">
|
||||
<title>Types</title>
|
||||
|
||||
|
@ -796,7 +796,7 @@ echo "He drunk some ${beer}s"; // works
|
|||
<informalexample>
|
||||
<programlisting role="php">
|
||||
$fruits = array( 'strawberry' => 'red' , 'banana' => 'yellow' );
|
||||
echo "A banana is $fruits[banana].";
|
||||
echo "A banana is $fruits[banana]."; // this works, but is wrong <link linkend="language.types.array.foo-bar">see the explanation</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