<?php $a = [20,22,29,40,67,35,98,200,205,220]; subTractReccursive($a); function subTractReccursive($a){ for($i=0;$i<count($a)-1;$i++){ $c[] = $a[$i+1]-$a[$i]; } echo implode (' ',$c)."\n"; if(count($c) > 1){ subTractReccursive($c); } return; }
You have javascript disabled. You will not be able to edit any code.