[Solved] syntax error, unexpected ‘(‘, expecting variable (T_VARIABLE) or ‘$’
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. 11 solved syntax error, unexpected ‘(‘, expecting variable (T_VARIABLE) or ‘$’