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 Build a Basic PHP Website (2018) Adding a Basic Form Concatenation

please help im stuck here dont know where im doing it wrong

how do i solve this

index.php
<?php

$title = "Dr.";
$firstName = "David";
$lastName = "Bowman";

$fullName = $title . ' ' . $firstName . ' ' . $lastName;

echo "The lead character from 2001: A Space Odyssey is named named". $fullName;
?>

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! You're doing great, but I feel like the answer to your question would be more obvious if you used the "Preview" button inside the challenge. There is a hint there to not forget the space between "named" and the man's name.

Take a look at what your code is echoing out:

The lead character from 2001: A Space Odyssey is named namedDr. David Bowman

But the output should be:

The lead character from 2001: A Space Odyssey is named Dr. David Bowman

Note that your output has the word "named" not once, but twice and there is a space missing between "named" and "Dr. David Bowman".

I think you can get it with these hints, but let me know if you're still stuck! :sparkles: