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

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.