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 trialKonrad Pilch
2,435 PointsHOw can i get working this?
HI,
HOw can i make it the correct way?
<?php
define("TITLE", "Home | <?php echo $companyName ?> ");
include('includes/header.php')
?>
1 Answer
Grace Kelly
33,990 PointsHi Konrad, looking at your code, I would suggest trying the following:
<?php
define("TITLE", "Home | " . $companyName ); //remove echo statement and concatenate $companyName
include('includes/header.php'); //add semi-colan
?>
Hope that helps!!
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsThank you but Hmmm, now thats the company name is in the header.php, it doesnt apear xd if i put the include above it doesnt work : p
and i did try to concatinate it though i did it wrong : p
Grace Kelly
33,990 PointsGrace Kelly
33,990 PointsHmm make sure you're declaring the $companyName variable correctly in your header.php file and also you are including it correctly e.g the files/folders are spelled correctly. Because by doing the following, the TITLE echoes out perfectly:
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsHI, This one does workbut though, now i have two the same variable while i wanted to controll everything universaly : p desidree.com is the site im doing and i have the company name in the header but now i have other variable for the title as well : p