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

miles higgins
miles higgins
2,104 Points

stuck confused about what its asking for

cant figure out what it wants have tried echoing and a few others and now i am missing something

index.php
<?php

//Place your code below this comment
$firstName =  'Rasmus' ;
$lastName = 'Lerdorf' ;
$fullname = Rasmus  Lerdorf ;

?>

1 Answer

Chris Shaw
Chris Shaw
26,676 Points

Hi miles higgins,

Task 2 of this challenge simply wants you to use concatenation which you've learned about at the below link, concatenation can be achieved by using a period with a string in the middle which is what this challenge is expecting.

https://teamtreehouse.com/library/combining-strings

Watch that and let me know how you go as it explains everything to get to the correct answer.

miles higgins
miles higgins
2,104 Points

yeah its making no sense to me i have watched that video like 6 times and cant figure out how the period applies to the task. Im finding that im having a really hard time understanding what its actually asking for me to do and with little help when you get stuck. at some point i think it should offer some kind of hint

Chris Shaw
Chris Shaw
26,676 Points

I can understand the frustration, what this challenge is looking for is for you to join $firstName and $lastName together with a string that has a single space in it. For example, the below:

$foo = 'Hello';
$bar = 'World';
echo $foo . ' ' . $bar;

The echo statement shows the use of string concatenation which is what the challenge expects.