You are here

JavaScript

Handle PHP & JavaScript Global Variables in Drupal

Declaring and accessing PHP and JavaScript globals is not as straight forward as I thought it would be. first of all I'm going to go over how I first tried to implement PHP and JavaScript global variables and then what actually worked for me in Drupal 5 and 6.

Handle PHP & JavaScript Global Variables in Drupal

The PHP documentation on global variables - can be found inside the Variable Scope section - implies that if a variable is used within the context of a global variable, then the scope of this variable will span to includes and required files.