<?php
echo '<ul>';

$p = isset($_GET['p']) ? $_GET['p'] : '';
$arr_menu = array(
    'real' => 'Real',
    'complex' => 'Complex',
    'ajax' => 'Ajax',
    'search' => 'Search',
    'items-per-page' => 'Items Per Page',
    'sort' => 'Sort',
    'extra-cols' => 'Extra Cols',
    'data' => 'Data',
    '2D-array' => '2D Array',
    'csv' => 'CSV',
    'separate' => 'Separate',
    'custom' => 'Custom',
    'display' => 'Display',
    '2-pagers' => '2 Pagers',
    '2-tables' => '2 Tables',
    '2-items-per-page' => '2 Items Per Page',
    'format-cols' => 'Format Cols',
    'cell-attributes' => 'Cell Attributes',
    'json' => 'JSON',
    'export' => 'Export',
    'extra-vars' => 'Extra Vars',
    'charset' => 'Charset',
    'debug' => 'Debug'
);
$i=1;
foreach($arr_menu as $key => $value){
    echo '<li'.(($p=='' and $i==1 or $p==$key) ? ' class="current_page_item"' : '').'><a href="examples.php?p='.$key.'">'.$value.'</a></li>';
    if($p=='' and $i==1 or $p==$key){
        $title = ' / '.$value;
        $selected_file = ($i<10 ? '0' : '').$i.'-'.$key.'.php';
    }
    $i++;
}

echo '<ul>';
?>