Skip to content

Instantly share code, notes, and snippets.

@ratulcse10
Created August 20, 2017 17:07
Show Gist options
  • Save ratulcse10/4b50e1775caa8c7f2402a23139469c0f to your computer and use it in GitHub Desktop.
Save ratulcse10/4b50e1775caa8c7f2402a23139469c0f to your computer and use it in GitHub Desktop.
How to cast PHP Array to JS Array
<script>
var lan = <?php echo json_encode($user_data_lan); ?>;
var lon = <?php echo json_encode($user_data_lon); ?>;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment