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 trialCraig Watson
27,930 PointsFolder Name
Not getting the correct code for this challenge??
Help Please!!
Craig Watson
27,930 PointsHi Ken,
Unfortunately Task 2,
Thanks
2 Answers
Ken Alger
Treehouse TeacherCraig;
This tasks asks us to: at the top of the file, letβs include the third-party library. You can find it at class.palprimechecker.php
in the same folder as the file below. So we need to include or require that file in our code at the top of the code, right after the opening <?php
tag. Since it is in the same folder as our project file, we can just use:
require_once ('class.palprimechecker.php');
Happy coding,
Ken
Craig Watson
27,930 PointsHi Ken,
Task 2 / 3 complete now i have an issue with task 4..... The code I have entered is as follows:
<?php
require_once ('class.palprimechecker.php');
$checker = new PalprimeChecker();
$checker->$number;
$number = 17;
echo "The number " . $number ." ";
echo "(is|is not)";
echo " a palprime.";
?>
Any help is much appreciated!!
Ken Alger
Treehouse TeacherCraig;
To assign $checker a property of number with a value of 17, you would use:
$checker->number = 17;
If you remember from the PHPMailer video Randy assigned $mail a value in a similar fashion.
Try that and work on your echo statement to see if you can get the correct output, post back with any additional questions.
Happy coding,
Ken
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherCraig;
With which task (2-7) are you having difficulty?
Ken