note 49045 added to function.echo

From: Date: Sat, 15 Jan 2005 09:02:51 +0000
Subject: note 49045 added to function.echo
Groups: php.notes 
Request: Send a blank email to php-notes+get-83311@lists.php.net to get a copy of this message
You can use braces around variables as well as array items. This is useful to help recognition of your variables in your code, but most useful where the variable iteslf cannot be separated with spaces from the preceding/following code, for exmple in a file path: If a path is assigned the variable $path, then this code will not work: echo "$pathindex.php"; whereas this will echo "{$path}index.php"; ---- Manual Page -- http://www.php.net/manual/en/function.echo.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49045 Delete -- http://master.php.net/manage/user-notes.php?action=delete+49045&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49045&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+49045&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+49045&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+49045&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+49045&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+49045&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#83311) next »