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 trial

PHP PHP Basics Daily Exercise Program String Manipulation

Shawn McKibben
Shawn McKibben
1,882 Points

Create Two String Variables?

Create Two String Variables - The first will be named 'firstName' with a value of 'Rasmus' and the second will be named 'lastName' with a value of 'Lerdorf'.

Ive watched the video 3 times and dont see this covered as there is only one string in the hello name workspace/example?

index.php
<?php

//Place your code below this comment

?>

Really take a look at the video. Try not to follow it verbatim. Think outside the box. Keep your chin up. You got it slugger. A journey of 1000 miles starts with one step. Never swim within 45 minutes of eating, you'll cramp. I love you.

1 Answer

It's looking for you to first create two different strings.

$firstName = "Ramus";
$lastName = "Lerdorf";

Later on in the challenge you'll combine those two separate variables into a third variable. The goal of the challenge is to get you thinking in terms of variables that can be used/manipulated later instead of hard coded values everywhere.

$firstName = "Rasmus"; $lastName = "Lerdorf";

SSSSSSSS