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

[eluser]Shiju S S[/eluser]
I have a script with code
Code:
var fcontent=new Array();
var count="<?php echo $ctr;?>";
  
begintag='<div style="font: normal 14px Arial; padding: 5px; text-align:center; ">';
for (j=0; j<count; j++)
{
fcontent[j]="&lt;?php echo $c_purpose[$i];?&gt;";
"&lt;?php echo $i++;?&gt;";
}
closetag='&lt;/div&gt;';

$c_purpose is a php array. I want the array contents to be stored in the javascript array fcontent. $i is not incrementing. What is the solution.


Messages In This Thread
How to assign javascript variable in a php variable inside javascript function - by El Forum - 06-25-2012, 05:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB