Area of hexagon with given diagonal length | Function to calculate area ; Formula to find area ; Driver Code
< ? php function hexagonArea ( $ d ) { return ( 3 * sqrt ( 3 ) * pow ( $ d , 2 ) ) / 8 ; } $ d = 10 ; echo " Area ▁ of ▁ hexagon : ▁ " , hexagonArea ( $ d ) ; ? >