I have and Array in html
var Song_list = new Array("Symphony No.1", "Symphony No.2");
Now I want update the Song_list by the content of Song.txt file
Song.txt as below
Symphony No.1
Symphony No.2
Symphony No.3
Symphony No.4
Symphony No.5
I use explode() as the follows:
<?php
$f = fopen("Song.txt", "r");
while (!feof($f)) {
$arrSong = explode("\n",fgets($f));
}
fclose($f);
?>
Now I have an array in php and need java code to use this php array to update Song_list = new Array("Symphony No.1", "("Symphony No.1", "Symphony No.2", "Symphony No.3", "Symphony No.4", "Symphony No.5");
(java code to convert php array to javascript array)
Or if do not use php function explode, what jave code to import song.txt to updated array Song_list?
Thanks