Menu
Hi!
I’m learning PHP and I just wondering what the benefits are to use curly braces around variables i strings like:
$fruit1 = “apple”;
$fruit2 = “pineapple”;
echo “This bowl contain one {$fruit1} and one {$fruit2}”;
when this also work:
echo “This bowl contain one $fruit1 and one $fruit2”;
Is it necessary in HEREDOC ?
Thanks!