I have a table 10 rows, 10 columns. I want to define an array where I can place a value at e.g. pos. row 5, column 3.
The value itself is an array with more entries. And the entry of this array is also an array.
Example:
Row 1, column 1:
My text 1, Link to text 1
My text 2, Link to text 2
Row 4, column 5:
My text 3, Link to text 3
Row 6, column 2:
My text 1, Link to text 1
My text 2, Link to text 2
My text 3, Link to text 3
My text 4, Link to text 4
Not every table entry needs to be defined. A table element entry can have multiple entries. An entry consists of two values. A text and the link for the text.
The html-table is already defined. Now I want to fill it with the values (links) above.
My problem is, how to create an efficient data structure so that I easily can find table-positions that have entries (maybe without looping 10 rows 10 columns). For each entry I want to get the list of texts + links.
And how to access/read each entry of my definition. (I have no problem placing the value to my html-table.)
I'd really appreciate if someone could give me some code-example how to set up such a data structure.
var multiArray = [ ['element 0, 0', 'element 0, 1', 'element 0, 2'], ['element 1, 0', 'element 1, 1']];
and so on...
EDIT every single notation in [] is an array, so you just have to combine them into an another array
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With