Merge allocates a new array and COPIES elements of both arrays, while append actually means reusing the destination array elements without extra ... ... <看更多>
You can pass an array to JS like this: drupal_add_js(array('my_module' => array('events' => $events)), 'setting');. In javascript you can get the values ... ... <看更多>