How do I call my PHP initialized variable inside the string of onclick=""
?
I have Initialized $counter=7
and want to use that counter inside onclick=""
function.
This is how I did which is not working.
<a class="blogpost page-transition" href="the_permalink();" onclick="gotoPageWithTrans6($counter)">
I also Tried doing this, but the following code also didn't worked.
<a class="blogpost page-transition" href="the_permalink();" onclick="gotoPageWithTrans6(?php $counter ?> )">
Any solution ?