note 54352 added to language.types.string

From: Date: Fri, 01 Jul 2005 06:19:17 +0000
Subject: note 54352 added to language.types.string
Groups: php.notes 
Request: Send a blank email to php-notes+get-91240@lists.php.net to get a copy of this message
The above example in the "Complex (curly) syntax" section contains the following error: -------------------------------------------------------------- echo "This is the value of the var named $name: {${$name}}"; -------------------------------------------------------------- There are two mistakes in this code: 1. Because the first instance of $name is in double-quotes, the actual variable will be printed out (ex., "This is the value of the var named Bob:"). 2. The second $ inside the curly brackets must be removed. The corrected example is: -------------------------------------------------------------- echo "This is the value of the var named \$name: {${name}}"; -------------------------------------------------------------- ---- Manual Page -- http://www.php.net/manual/en/language.types.string.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54352 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54352&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54352&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54352&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54352&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54352&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54352&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54352&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#91240) next »