Triangular Matchstick Number | PHP program to find X - th triangular matchstick number ; Driver code
< ? php function numberOfSticks ( $ x ) { return ( 3 * $ x * ( $ x + 1 ) ) / 2 ; } echo ( numberOfSticks ( 7 ) ) ; ? >