Converting PHP Array into java-script array can be done by using json_ecode functions in php.
See, Following how to convert PHP Array into JavaScript Array.
$phpArray = array( 'web','web technology','web technology experts', 'web technology experts notes' ); echo '';
Output:
var javaScriptArray =["web","web technology","web technology experts","web technology experts notes"]