function to find number of squares of a * a required to cover n * m rectangle
< ? php function Squares ( $ n , $ m , $ a ) { return ( ( int ) ( ( $ m + $ a - 1 ) / $ a ) ) * ( ( int ) ( ( $ n + $ a - 1 ) / $ a ) ) ; }