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 trialMartina Carrington
15,754 Pointsi need extra help on wrapping up the project , i have try several temps to pass but i end up getting error's
.<?php
include_once ("class.palprimechecker.php"); $checker = new palprimechecker ;
$checker -> number = 151,1881,12421; $palprime_number = $checker->number;
$palprime_status = ( $checker->isPalprime() ? "is" : "is not");
echo "The number $palprime_number $palprime_status a palprime.";
<?php
include_once ("class.palprimechecker.php"); $checker = new palprimechecker ;
$checker -> number = 151; $palprime_number = $checker->number;
$palprime_status = ( $checker->isPalprime() ? "is" : "is not");
echo "The number $palprime_number $palprime_status a palprime.";
if ($checker->isPalprime()) {
echo "is";
} else {
echo "is not";
}
echo " a palprime.";
?>
1 Answer
Placid Rodrigues
12,630 PointsTry this:
<?php
require_once("class.palprimechecker.php");
$checker = new PalprimeChecker;
$checker->number = 16661;
echo "The number " . $checker->number;
echo ($checker->isPalprime()) ? "is" : "is not";
//echo "(is|is not)";
echo " a palprime.";
?>
Martina Carrington
15,754 PointsMartina Carrington
15,754 Pointsthank you so much Placid :D