note 73400 added to language.types.string
| From: | fmouse at fmp dot com | Date: | Wed, 21 Feb 2007 18:20:46 +0000 |
| Subject: | note 73400 added to language.types.string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-123674@lists.php.net to get a copy of this message | ||
It may be obvious to some, but it's convenient to note that variables _will_ be expanded inside
of single quotes if these occur inside of a double-quoted string. This can be handy in constructing
exec calls with complex data to be passed to other programs. e.g.:
$foo = "green";
echo "the grass is $foo";
the grass is green
echo 'the grass is $foo';
the grass is $foo
echo "the grass is '$foo'";
the grass is 'green'
----
Server IP: 64.71.164.2
Probable Submitter: 70.112.241.55
----
Manual Page -- http://www.php.net/manual/en/language.types.string.php
Edit -- https://master.php.net/note/edit/73400
Del: integrated -- https://master.php.net/note/delete/73400/integrated
Del: useless -- https://master.php.net/note/delete/73400/useless
Del: bad code -- https://master.php.net/note/delete/73400/bad+code
Del: spam -- https://master.php.net/note/delete/73400/spam
Del: non-english -- https://master.php.net/note/delete/73400/non-english
Del: in docs -- https://master.php.net/note/delete/73400/in+docs
Del: other reasons-- https://master.php.net/note/delete/73400
Reject -- https://master.php.net/note/reject/73400
Search -- https://master.php.net/manage/user-notes.php