Driver code
$ a = array ( array ( 1 , 2 , 3 , 4 ) , array ( 5 , 6 , 7 , 8 ) , array ( 1 , 2 , 3 , 4 ) , array ( 5 , 6 , 7 , 8 ) ) ; $ sum = getBoundarySum ( $ a , 4 , 4 ) ; echo " Sum ▁ of ▁ boundary ▁ elements ▁ is ▁ " , $ sum ; ? >