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 Arrays and Control Structures PHP Arrays Modifying Arrays

Dallas Freeman
Dallas Freeman
3,637 Points

untouched challenge code gives error in preview?

Is it a problem that the code I'm given to start with on this code challenge, when unedited and previewed, is showing this? : PHP Warning: strstr(): Empty needle in 77dfaaeb-b56d-400e-81ab-831385585086.php on line 68 Warning: strstr(): Empty needle in 77dfaaeb-b56d-400e-81ab-831385585086.php on line 68 PHP Warning: strstr(): Empty needle in 77dfaaeb-b56d-400e-81ab-831385585086.php on line 68 Warning: strstr(): Empty needle in 77dfaaeb-b56d-400e-81ab-831385585086.php on line 68

index.php
<?php

$colors = array("Red","Green","Blue");

//add modifications below this line

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Dallas,

Yep. if you didn't add the code specified by the Task, odds are it will throw an error. The code checker is looking for a specific return sequence.

I went through the challenge and with the code entered as per each task, it all passes okay.

Keep Coding! :) :dizzy: