let's say I have these two arrays:
$array1 = array(1, 2, 3, 4, 5);
$array2 = array(6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
As you can see, my arrays have different lengths. What I'm trying to do is to input these array values into an HTML table with the first column containing the values coming from $array1
and the second column containing the values coming from $array2
. So, in this case right here, I should have a table of 10 rows (because $array2
contains 10 elements) and 2 columns (because I have 2 arrays). Also, I cannot know in advance which array is going to have more elements than the other (so, $array1
could be bigger than $array2
, they could also have equal sizes). So, depending on which array has more elements, the number of rows in my table should adjust accordingly.
Any idea please?
Thank you