rubahfgouveia Posted August 17, 2010 Share Posted August 17, 2010 Hello all, I'm really new in JS and I was wondering if it's possible to get a PHP variable, and use it inside JS. for example: <? $x = 7; ?> <script> teste.funct = function (e) { var fff = new G.P('myc3',[<?php echo "$x"?>,3,5,6,2,1,4]); } </script> something like that.. Quote Link to comment Share on other sites More sharing options...
Alex Posted August 17, 2010 Share Posted August 17, 2010 Give it a try. Quote Link to comment Share on other sites More sharing options...
rubahfgouveia Posted August 17, 2010 Author Share Posted August 17, 2010 works just fine sorry for bothering.. I was already expecting the worse Cheers, and thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.