Skip to content

Instantly share code, notes, and snippets.

@mohamedrez
Created September 8, 2015 09:19
Show Gist options
  • Save mohamedrez/eaf0d4f7c3584e97df51 to your computer and use it in GitHub Desktop.
Save mohamedrez/eaf0d4f7c3584e97df51 to your computer and use it in GitHub Desktop.
Drupal 7 adding variable to javascript
drupal_add_js(array('YOURMODULE' => array('testvar' => $testvar)), array('type' => 'setting'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment