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