I obtained a value in PHP and wanna use it in javascript.
Is there any way to do so ??
Here is the code i am using which is not working
$var = "abc";
document.getElementById(<?php echo $act;?>).class="active";
I am using echo $var
inside the getElementById
method..