I have a two dimensional array with unknown number of elements.
$two_darray[row][column]; //there will be an unknown integer values instead of row and column keywords
If I were to write a for
loop as follows, how can I determine how many rows and columns in my $two_darray
. Can you please tell me if there is a library function in php that can tell me the value inside [????] [????]
for($row=0; $row<………; $row++)
{
for($column =0; $column <………; $ column ++)
{
echo $two_darray[$row][$column];
}
echo “
end of one column
”;
}
I really need to know the value of rows and columns in order to perform other calculations.