get array from php to javascript code example Example: copy php array to javascript var js_array = [<?php echo '"'.implode('","', $php_array).'"' ?>];