This package is a port of Axial hexagonal grid by Robert Brewitz, originally written in JS.
You can install the package via composer:
composer require astatroth/php-hexgriduse Astatroth\HexGrid\Grid;
$grid = new Grid;
print_r($grid->hexagon(0, 0, 3, true));The resulting array of coordinates can be user to draw a hexagonal grid itself. Visit the original github page if you want an example of how to draw the grid.
The MIT License (MIT). Please see License File for more information.