Hello all
It is one of the tricky problems in programming. I was looking for solution, and I found this smart one by dnmes
كود:<html> <script language="JavaScript"> var JSVar = 'something from JS code'; </script> <?php $MyVar1 = "?><script language=javascript>document.write('Something you want');</script><?php"; $MyVar1 = str_replace("?>", "", $MyVar1); print $MyVar1."<br><br>"; $MyVar2 = "?><script language=javascript>document.write(JSVar);</script><?php"; $MyVar2 = str_replace("?>", "", $MyVar2); print $MyVar2; ?> </html>
Put the code in php file save it and run it and see
منقول للفائدة..