Count the number of columns that do not contain a single zero element.
I managed to do it with strings, but how can I turn this with columns?
function GetCounterOfRowsWithoutZeroFromMatrix($matrix) { $counter = 0; for($i = 0; $i < count($matrix); $i++) { $hasZero = false; for ($j = 0; $j < count($matrix[$i]); $j++) if($matrix[$i][$j] == 0) { $hasZero = true; break; } if(!$hasZero) $counter++; } return $counter; } Now we need to come up with the GetCounterOfColumnsWithoutZeroFromMatrix method. Help)