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 trialPeter Dancause
4,072 PointsWorking on Xampp localhost.
Should I be getting different results when working out the problems on a local server (XAMPP/localhost) than when I work on Treehouses Work Environment? two examples
1. $name = 'Name';
$stringOne = 'Hello $name';
Output on Treehouse Workspace = Hello $name Output on localhost = syntax error variable $name not defined.
Steven Pozega
14,926 PointsSteven Pozega
14,926 PointsWhen you view your php file in a browser, you need to use "<br>" instead of "\n". Also, for your $stringOne variable you need to use double quotes("") to use a variable's value inside of a string. Using single quotes the value of $stringOne == 'Hello $name', not 'Hello Name'. Hope this helped!