1. Go to this page and download the library: Download wtabata/arraymenu library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wtabata / arraymenu example snippets
$array = [
'home' => [
'name' => 'Label for Home',
'link' => '#',
],
[ /* << see, here don't have key. no matter. just for help u */
'name' => 'Label for Contact'
],
];
$menu = new \Wt\ArrayMenu\Simple($array);
echo $menu;
//set primary Tag
$menu->setInit(['tag'=>'ol', 'class' =>'my_class']);
//set secondary Tag
$menu_b->setItem(['tag'=>'li', 'class' =>'my_class_for_item other']);