Skip to content

Instantly share code, notes, and snippets.

@VictorFursa
Created August 5, 2015 10:26
Show Gist options
  • Save VictorFursa/68bcca0d60b18ca4fa46 to your computer and use it in GitHub Desktop.
Save VictorFursa/68bcca0d60b18ca4fa46 to your computer and use it in GitHub Desktop.
array.php
<?php
$a = array( array(1,2,3), array(4,5,6));
for($i=0; $i < count($a[0]) ;$i++){
$b[] = $a[0][$i] + $a[0][$i];
$c[] = $a[1][$i] + $a[1][$i];
if ($b[$i] > $a[$i]){
echo $b[$i];
}
if ($c[$i] > $a[$i]){
echo "<br>$c[$i]";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment