Longhorn PHP 2025 - Call For Papers

Voting

: max(four, two)?
(Example: nine)

The Note You're Voting On

phunction.sf.net
15 years ago
You don't need any custom function to calculate the $divisor of the $matrix, using array_map() and array_sum() does the trick:

<?php

$matrix
= array
(
array(-
1, -1, -1),
array(-
1, 16, -1),
array(-
1, -1, -1),
);

$divisor = array_sum(array_map('array_sum', $matrix)); // 8

?>

<< Back to user notes page

To Top