PHP code example of jvs / simplenavigation

1. Go to this page and download the library: Download jvs/simplenavigation 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/ */

    

jvs / simplenavigation example snippets


$simpleNav = new JVS\SimpleNavigation;
$navItems = array('Home', 'About Us', 'Blog');

echo $simpleNav->make($navItems);

$simpleNav = new JVS\SimpleNavigation;
$navItems = array(
    'Home'     => 'http://www.example.com/',
    'About Us' => 'http://www.example.com/about.php',
    'Blog'     => 'http://www.example.com/blog.php',
);

echo $simpleNav->make($navItems);

$simpleNav = new JVS\SimpleNavigation;
$navItems = array(
    'Home'     => 'http://www.example.com/',
    'About Us' => array(
        'Our Company' => 'http://www.example.com/about/company.php',
        'Our Team'    => 'http://www.example.com/about/team.php',
    ),
    'Blog'     => 'http://www.example.com/blog.php',
);

echo $simpleNav->make($navItems);