<?php
$input = array(
array('filename' => 'home.html',
'title' => 'home page'),
array('filename' => 'products.html',
'title' => 'products'),
array('filename' => 'contact.html',
'title' => 'contact'),
array('filename' => 'prices.html',
'title' => 'prices'));
//echo add_accesskeys($input);
function add_accesskeys($arr)
{
$output = '<ul>';
foreach($arr as $key => $data)
{
$output .= '<li><a href="'. $data['filename'] .'" accesskey="'. $data['title']{0} .'">'. $data['title'] .'</a></li>';
}
$output .= '</ul>';
return $output;
}
?>