String interpolation: Difference between revisions

Content deleted Content added
Make the main example valid code
PHP: It’s easier to compare the PHP version if there’s not this weird line just for a new line.
Line 297:
$apples = 5;
$bananas = 3;
echo "There are $apples apples and $bananas bananas.\n";
echo "\n";
echo "I have {$apples} apples and {$bananas} bananas.";
</syntaxhighlight>The output will be: