mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Change curly braces statement (#1804)
The '$$' before the braces was a bit confusing. I added a couple lines that show that you have options on where the '$' goes when it comes to curly braces in strings.
This commit is contained in:
parent
84260a4cda
commit
367f1477f9
@ -88,6 +88,8 @@ $escaped = "This contains a \t tab character.";
|
|||||||
$unescaped = 'This just contains a slash and a t: \t';
|
$unescaped = 'This just contains a slash and a t: \t';
|
||||||
|
|
||||||
// Enclose a variable in curly braces if needed
|
// Enclose a variable in curly braces if needed
|
||||||
|
$apples = "I have {$number} apples to eat.";
|
||||||
|
$oranges = "I have ${number} oranges to eat.";
|
||||||
$money = "I have $${number} in the bank.";
|
$money = "I have $${number} in the bank.";
|
||||||
|
|
||||||
// Since PHP 5.3, nowdocs can be used for uninterpolated multi-liners
|
// Since PHP 5.3, nowdocs can be used for uninterpolated multi-liners
|
||||||
|
Loading…
Reference in New Issue
Block a user