Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP

Issue regarding "PHP basics" course task submitting.

Currently since yesterday, there is an issue I encounter upon submitting a task in the String manipulation section of the course. Upon submitting the third solution on the test, I get the message "Oops! It looks like Task 1 is no longer passing. Get Help" And this is regardless of how quick I complete the tasks, did it under 30 seconds and it still appeared. This happens if the code is correct, I tested it with intentionally wrong code and it displayed a proper error.

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

Hi! Would it be possible to get a link to the challenge and could you please post the code that you've tried thus far? There are a couple of reasons you might be getting this error message that are not the result of a technical difficulty. One reason you might get this error is if you've introduced a syntax error into your code. But another reason you might get this error is if you're overwriting a previous value of a variable when that was not explicitly asked for by the challenge. Speed has nothing to do with this message :sparkles:

2 Answers

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

Hi loan! There are a couple of problems here. First, you've introduced a syntax error by including the \ instead of a concatenation symbol which is a period/full stop. Just as you did between $firstName and $lastName. But even if we correct that, you've missed the part of the instructions that say to display the result of the $fullName together with the string they give. We use the echo statement to display information to the page. Currently, you're trying to write over your $fullName variable with additional string information. The code that you had in step 2 should remain unaltered. You should only be adding additional lines of code at this point. Let's take a look at an example:

Also, we achieve a new line by using \n.

<?php
  $dog1 = "Rex";
  $dog2 = "Tom";
  $myDogs = "$dog1" . " and " . "$dog2";
  echo "$myDogs sleep all day long.\n";
?>

Give it another shot with these tips in mind, but let me know if you're still stuck! :sparkles:

Yes, I will gladly provide. Thank you! Here is the link: https://teamtreehouse.com/library/php-basics-2/daily-exercise-program/string-manipulation And just to be sure, I am going to provide you with the code for all 3 tasks.

<?php
//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullname = "$firstName " . "$lastName" \"was the original creator of PHP"; 
?> 

is for the first

<?php
//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullname = "$firstName " . "$lastName" 
?>

is for the second

and

<?php
//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullname = "$firstName " . "$lastName" \"was the original creator of PHP"; 
?>

is for the third