Two-dimensional array is an array of arrays. You should decide what to store in $gmmdivarray - arrays or integers.
You have 2 rows that are incompatible
$gmmdivarray[$gmmcount] = 0; //telling $gmmdivarray will contain integer
$gmmdivarray[$gmmcount][$divcount] = 0; //trying to access - BUT $gmmdivarray[$gmmcount] is an integer already
maybe you need do this:
$gmmdivarray[$gmmcount] = array();
instead of
$gmmdivarray[$gmmcount] = 0;
and better to initialize array as array in the beginning of the function by this:
$gmmdivarray = array();
:rolleyes: