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

Weird Syntax Error....

I am using code similar to that of the Shirts 4 Mike 2 example. I have checked my syntax through multiple syntax checkers that find no error. But my MAMP php error_log is telling me that there is an unexpected '.' on line 7 of my code. Can someone please figure out what's wrong?

<?php

function get_thumb_view_html($thumb) {

$thumb_layout = "";

$thumb_layout = $thumb_layout . '<li class="span3">';
$thumb_layout = $thumb_layout . '<a class="thumbnail" href="' . $thumb["link"] . '">';
$thumb_layout = $thumb_layout . '<img src="' . $thumb["img"] . '" alt="' . $thumb["name"]           . '">';
$thumb_layout = $thumb_layout . '<p>' . $thumb["name"] .'</p>';
$thumb_layout = $thumb_layout . '<span>' . $thumb["filter"]. '</span>';
$thumb_layout = $thumb_layout . "</a>";
$thumb_layout = $thumb_layout . "</li>";

return $thumb_layout;

}




 $thumbs = array();
$thumbs[] = array(
"name" => "Colina Insurance",
"img" => "img/colina-thumb.jpg",
"link" => "#",
"filter" => "Advertising, Branding"
);
$thumbs[] = array(
"name" => "BTC",
"img" => "img/btc-thumb.jpg",
"link" => "#",
"filter" => "Advertising, Graphic Design"
);
$thumbs[] = array(
"name" => "BFSB",
"img" => "img/bfsb-thumb.jpg",
"link" => "#",
"filter" => "Branding, Print Design"
);
$thumbs[] = array(
"name" => "COB",
"img" => "img/colina-thumb.jpg",
"link" => "#",
"filter" => "Print Design, Graphic Design"
);
$thumbs[] = array(
"name" => "CFAL",
"img" => "img/cfal-thumb.jpg",
"link" => "#",
"filter" => "Branding, Advertising"
);


 ?>

1 Answer

Figured it out. Was editing a copy of the file instead of the original. Derp.