Program to print triangular number series till n | Function to find triangular number ; Driver Code
< ? php function triangular_series ( $ n ) { for ( $ i = 1 ; $ i <= $ n ; $ i ++ ) echo ( " ▁ " . $ i * ( $ i + 1 ) / 2 . " ▁ " ) ; } $ n = 5 ; triangular_series ( $ n ) ; ? >