harshpandya Posted March 7, 2008 Share Posted March 7, 2008 How can i call variable exist in PHP file to Javascript fileHelpgive me some simple code to understand please Link to comment Share on other sites More sharing options...
justsomeguy Posted March 7, 2008 Share Posted March 7, 2008 Just print it on the page.<script type="text/javascript">var var_name = "<?php echo $var; ?>";</script>For arrays you can use JSON.http://www.php.net/manual/en/function.json-encode.php Link to comment Share on other sites More sharing options...
harshpandya Posted March 7, 2008 Author Share Posted March 7, 2008 Thanks Man you are Cool Guy Link to comment Share on other sites More sharing options...
jeffman Posted March 7, 2008 Share Posted March 7, 2008 Thanks Man you are Cool GuyAwesome, dude. Not just "a" cool guy, which we always knew. Now your NAME is Cool Guy. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.