TRUSTINWEB Posted March 3, 2009 Share Posted March 3, 2009 Hello, Looking for help on implementing java script into php?? <script src=" http://www.trustinweb.com/esel.js" type="text/javascript"></script> Also, how would you write an include with this too>? Thanks- TRUSTINWEB Link to comment https://forums.phpfreaks.com/topic/147701-how-do-you-put-java-script-in-php/ Share on other sites More sharing options...
Chrisynd Posted March 3, 2009 Share Posted March 3, 2009 If you just want that inserted into your HTML: <?php echo "<script src=\" http://www.trustinweb.com/esel.js\" type=\"text/javascript\"></script>"; ?> Link to comment https://forums.phpfreaks.com/topic/147701-how-do-you-put-java-script-in-php/#findComment-775286 Share on other sites More sharing options...
WolfRage Posted March 3, 2009 Share Posted March 3, 2009 Use single qoutes instead of double qoutes and it will be faster. Unless you are trying to use a variable, then you want to put php into eval mode. This only really becomes important when you have large scripts. Link to comment https://forums.phpfreaks.com/topic/147701-how-do-you-put-java-script-in-php/#findComment-775288 Share on other sites More sharing options...
TRUSTINWEB Posted March 3, 2009 Author Share Posted March 3, 2009 Chrisynd, Thanks for the quick response! I will give it a try- TRUSTINWEB Link to comment https://forums.phpfreaks.com/topic/147701-how-do-you-put-java-script-in-php/#findComment-775291 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.