I have a problem, I'm trying to dynamically add some html via javascript, and the html has a js function that's supposed to trigger when it's clicked, but I keep getting this error no matter what I do Uncaught SyntaxError: Unexpected token }
Has anyone had this problem before? This has eluded me..
My code is :
<?php
foreach($folder_info as $show)
{
echo '<table><tr>';
echo '<span class="glyphicon glyphicon-folder-close" onclick="'.site_url().'/gallery/upload_images" aria-hidden="true" style="font-size:100px;"></span><br/>'.$show['folder_name'];
echo '</tr></table>';
}
?>
Where am I getting Wrong? Can Anyone help me to segment the line with php and html correctly..