text: Area of a Hexagon | function for calculating area of the hexagon . ; Length of a side
code: < ? php function hexagonArea ( $ s ) { return ( ( 3 * sqrt ( 3 ) * ( $ s * $ s ) ) / 2 ) ; } $ s = 4 ; echo ( " Area ▁ : ▁ " ) ; echo ( hexagonArea ( $ s ) ) ; ? >