The below code causes:
Uncaught SyntaxError: Unexpected token <
Any ideas how to resolve this issue? My goal is to use supersize with directory image discovery instead of the static HTML entries that it is written with. I found an article (http://www.zachmelo.com/customizing-supersize-jquery/) that speaks of this very thing, but the code throws the error at slides: [<
jQuery(function($){
$.supersized({
// Functionality
slide_interval : 3000, // Length between transitions
transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
transition_speed : 700, // Speed of transition
// Components
slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank')
slides :[<?php
$directory = "/img/";
$directory_thumbs = "/img/thumbs/";
$images = glob($directory . "*.png");
$images_thumb = glob($directory_thumbs . "*.png");
$images_final = array_combine($images,$images_thumb);
foreach($images_final as $image = $key)
{
$name= $image;
$name-chop= trim($name, $directory);
$name-chop= trim($name-chop, ".png");
$name-chop= str_replace('_',' ', $name-chop);
echo "{image : ' $image ', title : ' $name-chop ' , thumb : '$key' },";
}?>]
});