Essentially, I need to create an array of arrays.
I am using Javascript inside an .HTML file. I am reading from a .txt file
Let's call the first array "alerts" and then each array inside that is an "incident."
Each incident has three values associated with it: an ID number, a latitude value, and a longitude value.
If I put the values in a text file and each one is on a separate line, what function/how should I go about reading in each, and then assigning them to variables to be stored in an incident array?
<script type="text/javascript">
//open text file
$f = fopen("LatLngTest.txt", "r");
//read line by line: 1st line=ID, 2nd line=LAT, 3rd line=LNG
//store in ID, LAT, LNG variables
//close text file
fclose($f);
//create incident array and save ID, LAT, LNG as one incident
var incident = new Array (ID, LAT, LNG);
//create array of alerts
var alerts = new Array();
//if statement to check length of array
//and add this incident to the end
//alerts[i] = incident;
</script>
file textusingjavascript??