Pass PHP variables to Javascript in Drupal 6
2008 April 28
To access PHP values and variables from Javascript using Drupal, you can send them to your javascript code using Drupal's drupal_add_js
as follows:
drupal_add_js(array('mymodule' => array(
'username' => 'Mike',
'uid' => 123,
'likes' => array('ice cream', 'peanuts', 'coffee'),
)), 'setting');
How to tell it’s spring, method #734
2008 April 10
When the space above the stove is "hot," instead of "not cold." read more…