Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBascarau Daniel
2,002 PointsI don't understand the question
I have no ideea what to do... I dont't understand the meaning of the sentences.
<?php
include("flavor.php");
function get_flavor() {
return get_flavor() ;
}
echo "Hal's favorite flavor of ice cream is ____.";
?>
1 Answer
eduardomejia2
Courses Plus Student 22,237 PointsThe first sentence asks to include the flavor.php file.
include "flavor.php";
The second one points that the function get_flavor is in the flavor.php file, as the file is already included in our current file we just call the function to our output.php file and assign the value to the variable $flavor.
include "flavor.php";
$flavor = get_flavor();
And finally we just display the value of the variable $flavor in our echo statement.
include "flavor.php";
$flavor = get_flavor();
echo "Hal's favorite flavor of ice cream is " . $flavor . ".";
Jeff Lemay
14,268 PointsJeff Lemay
14,268 PointsHere's a previous solution: https://teamtreehouse.com/community/what-is-wrong-with-my-code-build-a-php-website-review