Program to print Arithmetic Progression series | PHP Program to print an arithmetic progression series ; Printing AP by simply adding d to previous term . ; starting number ; Common difference ; N th term to be find
< ? php function printAP ( $ a , $ d , $ n ) { $ curr_term ; $ curr_term = a ; for ( $ i = 1 ; $ i <= $ n ; $ i ++ ) { echo ( $ curr_term . " " ) ; $ curr_term += $ d ; } } $ a = 2 ; $ d = 1 ; $ n = 5 ; printAP ( $ a , $ d , $ n ) ; ? >