get value from javascript and use in php loop
Hi,
I want to get the value from javascript into php and my loop will go on according to the value received from javascript. But i am not getting into the loop. I tried type casting too but could not get solution. Can any one help me please. My code goes like this
<script language='javascript'>
var nom = 3;
</script>
<?php
$nom = "<script language='javascript'> document.write(nom);</script>";
echo $nom;
for($i=0; $i<$nom; $i++)
{
echo "Test";
}
?>
|