Heptagonal number | Function to return Nth Heptagonal number ; Driver Code
< ? php function heptagonalNumber ( $ n ) { return ( ( 5 * $ n * $ n ) - ( 3 * $ n ) ) / 2 ; } $ n = 2 ; echo heptagonalNumber ( $ n ) , " STRNEWLINE " ; $ n = 15 ; echo heptagonalNumber ( $ n ) ; ? >