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 Simple PHP Application Adding a Contact Form Concatentation

JAKZ AIZZAT
JAKZ AIZZAT
7,813 Points

Help me to solve this problem

How to solve this problem. Its ask to use concatenation at last? I donrt have idea how to finish it.

1 Answer

Hello,

When you concatenate you are adding something to the end of a string or appending something to a variable. You use the period (.) to concatenate two things (strings more or less) to each other like the following below:

<?php

$hello = "Hello there, ";
$name = "Michael";
echo $hello . $name;

?>

That would print "Hello there, Michael".

The challenge is asking for something sort of like what I did. You can also use the double-quote notation to add a variable into a statement being echoed out like so:

<?php

$name = "Michael";
echo "Hello there, $name";

?>

Hopefully this has helped you understand what the challenge is asking of you.

Cheers!

JAKZ AIZZAT
JAKZ AIZZAT
7,813 Points

I understand your explanation but I still cant pass that challenge. I don't know what's the question want. Can you help me sir.