Skip to content Skip to sidebar Skip to footer

Syntax Error, Unexpected '(', Expecting Variable (t_variable) Or '$'

I'm trying to build tabbed panels where a user can retain at current tab after refresh, updates etc. So, I'm trying to apply this script to my web as a tabbed panel but can't figur

Solution 1:

You're using Javascript (jQuery to be precise) syntax inside PHP. Hence, the error.

syntax error, unexpected '(', expecting variable (T_VARIABLE) or '$'

  • Those are 2 different animals altogether.

Replace <?php with <script> and ?> with </script> and your code will work.

Post a Comment for "Syntax Error, Unexpected '(', Expecting Variable (t_variable) Or '$'"