I want to load data into an array but the amount of data depends on the mysql database and that amount of data can grow and shrink.
I am placing little flags on a city map and have 4 bits of data coming in per flag. (id, color, x-coordinate and y-coordinate)
The number of flags will change constantly though because users can add and remove them.
So every time the map loads it gets the current flags (4 bits of data each) from the mysql database.
I want to have a 2 dimentional array to load the data into and use a row per flag. So position 1.0, 1.1, 1.2 and 1.3 are the first flag.
Then 2.0, 2.1, 2.2, and 2.3 for the next etc..
But I don't know how many flags will be loaded so i cannot beforehand create the array since I don't know the size it has to be yet.
So is there a way that i can either..
-Check the number of bits of data that come in through AJAX.LastData (divided by a separator). And then quickly create the array in the right size and load the data into the array?
-Create a 4x1 array and increase the Y size of the array on the fly while loading data into it?