converting a javascript variable into php variable
Posted: Sat Sep 29, 2007 1:40 am
hi
I am new in PHP and Javascript . I have to convert a javascript variable into php variable. I am trying in the following way
$phpVar="<script>document.write(MyVar)</script>";
echo $phpVar;---->this display the contents of MyVar
But
echo $phpVar[0];
echo $phpVar[1];
echo $phpVar[2];
.
.
.
.
doesnt display the contents of MyVar..
can any one help me.
Thanks in advance
I am new in PHP and Javascript . I have to convert a javascript variable into php variable. I am trying in the following way
$phpVar="<script>document.write(MyVar)</script>";
echo $phpVar;---->this display the contents of MyVar
But
echo $phpVar[0];
echo $phpVar[1];
echo $phpVar[2];
.
.
.
.
doesnt display the contents of MyVar..
can any one help me.
Thanks in advance