sooperfish parse error: syntax error, unexpected 'function' (T_FUNCTION)
Permalink
Hello,
I'm currently working on localhost and wanting to add a drop down menu. After following the instructions here:
http://www.codeblog.ch/2011/12/concrete5-sooperfish-drop-down-navig...
I'm receiving the following error message:
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in ../blocks/autonav/templates/sooperfish/view.php on line 5
the file is as follows:
Any help would be appreciated.
I'm currently working on localhost and wanting to add a drop down menu. After following the instructions here:
http://www.codeblog.ch/2011/12/concrete5-sooperfish-drop-down-navig...
I'm receiving the following error message:
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in ../blocks/autonav/templates/sooperfish/view.php on line 5
the file is as follows:
<?php $bvt = new BlockViewTemplate($b); $bvt->setBlockCustomTemplate(false); function callback($buffer) { return (str_replace('class="nav"', 'class="sf-menu" id="nav"', $buffer)); } ob_start("callback"); include($bvt->getTemplate()); ob_end_flush(); ?>
Any help would be appreciated.
I deleted the line above the function callback and returned it down again to add a space…did the same for the ob_start line and it worked.
Thanks,