fork(1) download
  1. <?php
  2.  
  3. $Ids = array(1, 2, 3, 4);
  4. $result = count($Ids);
  5.  
  6. for ($i = 0; $i < ($result-1) ; $i++) {
  7. echo "\$Pair [".$i."] = ".$Ids[$i]. "+" .$Ids[$i+1];
  8. echo "\n";
  9. }
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
$Pair [0] = 1+2
$Pair [1] = 2+3
$Pair [2] = 3+4