I am getting the following error while passing two php variable inside the javascript function.
Error:
Uncaught SyntaxError: Unexpected token ,
My code is given below.
<script>
editQuestionField(<?php echo $GLOBALS['ques'] ?>,<?php echo $GLOBALS['id'] ?>);
</script>
its generating the html output in browser console which is given below.
editQuestionField(,5742d88fe4017af412000030);
Please help me to resolve this error.