PHP Build a Basic PHP Website (2018) Building a Media Library in PHP Variables and Conditionals

You need to 'echo' the value in $flavor.

final chapter

index.php
<?php
$flavor= "choco";
echo "<p>Your favorite flavor of ice cream is choco";
echo "vanilla";
echo ".</p>";
echo "<p>Hal's favorite flavor is cookie dough, also!</p>";

?>

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 85,423 Points

Hi there,

It looks like what you need to do is echo a variable value directly into a string.

Since you're using double quotes "" for your string, you can do this by simply typing the variable name in those, to replace the hard coded names in there and you should be good to go! :-)