In my below code I got so confused. I have identified a variable in PHP then I got into a JavaScript loop and I want to increment my PHP variable with the JS loop. but what happens is that it increases only for one time and exit from the loop! below code to understand:
<?php
$ct =5 ;
?>
<script type="text/javascript">
for(var r=1; r<=10; r++ )
{
<?php $ct++ ;?>
}
alert(<?php echo $ct;?>);
the alert here gives me 6!! but as much as I understand It should give me 15