Welcome Guest, Not a member yet? Register   Sign In
How to assign javascript variable in a php variable inside javascript function
#4

[eluser]Shiju S S[/eluser]
I got it with the following jsscript code
Code:
var count="<?php echo $ctr;?>";
   var a=new Array;
   <?php
    for($i=0;$i<count($c_purpose); $i++)
    {
     echo "a[$i]='".$c_purpose[$i]."';\n";
    }
    ?&gt;
where $ctr and $c_purpose are php variables


Messages In This Thread
How to assign javascript variable in a php variable inside javascript function - by El Forum - 08-14-2012, 04:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB