![]() |
little php help
how do I declare a variable in php to use in javascript
Code:
function msnad_head() { |
Try this:
PHP Code:
|
result is blank
var maintxt = ""; is its output |
The array $msnad_settings is not defined in your function.
Where does its value come from? |
Right, $msnad_settings is out of scope.
You'll either need to give it some kind of global scope such as assigning it to a $_SESSION variable, or pass it to your function. |
ya works now forgot to global $msnad_settings;
|
Darrrrrrrrr.
|
All times are GMT -7. The time now is 07:53 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc