Skip to content

Instantly share code, notes, and snippets.

@VictorFursa
Last active August 29, 2015 14:27
Show Gist options
  • Save VictorFursa/35cac6e16040862bab66 to your computer and use it in GitHub Desktop.
Save VictorFursa/35cac6e16040862bab66 to your computer and use it in GitHub Desktop.
<?php
$a = array(array(10, 11, 2), array(15,19,7), array(1,30,20) );
$buffer = array();
$max = $a[0][0];
for($i = 0;$i < count($a);$i++){
for ($j = 0; $j < count($a[$i]); $j++){
if($a[$i][$j] > $max) {
$max = $a[$i][$j];
}
}
$buffer[$i] = $max;
}
foreach ($buffer as $v){
$v = $v + $v;
}
echo $v;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment