Source for file grouped.php
Documentation is available at grouped.php
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>HTML_Select demo: option groups</title>
<form method="get" action="#">
<label for="color">Select some colors:</label>
* Demo for HTML_Select with options groups
//you do *not* need the following line!
require_once 'HTML/Select.php';
//key is used as label, value as <option value="">.
'dark grey' => '#666666',
'light grey' => '#DDDDDD',
//multiselect with height of 12 lines
//preselected values are dark grey and red
$hs->loadArray ($colors, array ('#666666', '#FF0000'));
<label for="year">Select a year:</label>
* Demo for HTML_Select with options groups
'seventies' => range(1970 , 1979 ),
'eighties' => range(1980 , 1989 ),
'nineties' => range(1990 , 1999 )
//multiselect with height of 12 lines
//preselected year is 1982
$hs->loadValueArray ($years, 1982 );
Documentation generated on Mon, 11 Mar 2019 15:47:41 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|