Sunday, 29 September 2013

How to call variable value inside string in PHP

How to call variable value inside string in PHP

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 ?

No comments:

Post a Comment