note 73400 deleted from language.types.string by cmb
| From: | cmb@php.net | Date: | Sun, 04 Aug 2019 09:13:10 +0000 |
| Subject: | note 73400 deleted from language.types.string by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211803@lists.php.net to get a copy of this message | ||
Note Submitter: fmouse at fmp dot com
----
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'