Update Array by explode()
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
Re: Update Array by explode()
You may get help if you find some html boards. Correct me if I am wrong, these boards directly concern the programming language Java.
Re: Update Array by explode()
java != javascript. Thread moved to other programming languages.
Re: Update Array by explode()
hey .. You should post this thread to some html or javascript thread forums ... because javascript is not equal to java and here java discusses in forums instead of java scripts..
Re: Update Array by explode()
Quote:
Originally Posted by
jason003
hey .. You should post this thread to some html or javascript thread forums ... because javascript is not equal to java and here java discusses in forums instead of java scripts..
I suspect the user got this impressions almost 6 months ago when the first posted (and last visited). Please be cognizant of the posted dates of threads before replying to long dead threads