Skip to content

Instantly share code, notes, and snippets.

@3ffusi0on
Created January 18, 2016 16:22
Show Gist options
  • Save 3ffusi0on/922e5a0338b6c0f83d4f to your computer and use it in GitHub Desktop.
Save 3ffusi0on/922e5a0338b6c0f83d4f to your computer and use it in GitHub Desktop.
Passing PHP Arrays to JavaScript
var array = <?php echo '["' . implode('", "', $array) . '"]' ?>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment