Thread: little php help
View Single Post
Old 10-19-2009, 09:57 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,241
little php help

how do I declare a variable in php to use in javascript

Code:
function msnad_head() {
    $siteurl = get_option('siteurl');
    $url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/msnad.js';

    print('
<script type="text/javascript">
    var linkout="http://www.google.com";
    var maintxt = $msnad_settings['message']; //this part
    var toptext="New Instant Message:";
    var imgad="impic.jpg";
</script>
<script type="text/javascript" src="'.$url.'"></script>

    ');
}
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote