In php, Number of rows and columns in a 2 D array?

后端 未结 6 1886
野性不改
野性不改 2021-01-07 04:38

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

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-07 04:45

    the quick way for normal,non-mixed 2-dim Array,

    $Rows=count($array); $colomns=(count($array,1)-count($array))/count($array);

提交回复
热议问题