如何在Jquery通知中添加PHP变量[重复]

Possible Duplicate:
passing variables from php to javascript

I am using this awesome jQuery Stick Notification Plugin which creates notifications upon clicking various buttons. I used the following code to display the notification box...

$(".notify").click(function() {
     $.sticky('The page has loaded!');
});

Can i make it display some PHP variables in place of static text message?

Hope i've made it clear enough.

Without making asynchronous HTTP calls, you will have to insert the PHP variable at server-side:

$(".notify").click(function() {
    $.sticky('<?php echo htmlentities($message); ?>');
});

Wrap it with htmlentities() just in case $message contains some chars that make the JavaScript string invalid.

yes you can like

$(".notify").click(function() {    
 $.sticky('<?php echo "The page has been loaded"; ?>');    
});