$fach_options = array(0 => ' ', 1 => 'Mathe', 2 => 'SL', 3 => 'Englisch');
//Werte des Faecher-Arrays
$lehrer_name = array('Lehrer');
$lehrer_options = array(0 => ' ', 1 => 'Voigt', 2 => 'Häckl', 3 => 'Grütte');
//Werte des Lehrer-Arrays
$raum_name = array('Raum');
$raum_options = array(0 => ' ', 1 => '2.16', 2 => '2.18', 3 => '2.31');
//Werte des Raum-Arrays
$klasse_name = array('Klasse');
$klasse_options = array(0 => ' ', 1 => 'BIT06/1P', 2 => 'BIT07/1P', 3 => 'BIT08/1P');
//Werte des Klasse-Arrays
$klasse_pulldown = pulli($klasse_name, $klasse_options);
$fach_pulldown = pulli($fach_name, $fach_options);
//Zuweisung des Array einer Variablen
$lehrer_pulldown = pulli($lehrer_name, $lehrer_options);
$raum_pulldown = pulli($raum_name, $raum_options);
?>

<html>
<head>
<title>Stundenplan</title>
</head>
<body>
        Klasse: <?php 
echo $klasse_pulldown;
?>
 <input type="button" value="Best&auml;tigen" name="accept"><br><br>                          <!--Aufruf der Variablen die ein Array enthält-->

        <table border="0">
            <tr>
                <td>G&uuml;ltigkeitszeitraum von <input type="text" maxlength="10" size="10" value=""> bis <input type="text" maxlength="10" size="10" value=""></td>
Beispiel #2
0
$jahre = array();
for ($i = 1900; $i <= 2010; $i++) {
    $jahre[] = $i;
}
$day_pull_name = 'tag_input_reg';
$day_name = array('tag_input_reg');
$day_options = $tage;
$month_pull_name = 'monat_input_reg';
$month_name = array('monat_input_reg');
$month_options = $monate;
$year_pull_name = 'jahr_input_reg';
$year_name = array('jahr_input_reg');
$year_options = $jahre;
$day_pulldown = pulli($day_name, $day_options, $day_pull_name);
$month_pulldown = pulli($month_name, $month_options, $month_pull_name);
$year_pulldown = pulli($year_name, $year_options, $year_pull_name);
?>

<html>
<head>
<title>Benutzer registrieren</title>
</head>
<body>

<h2>Registrierung eines Benutzers</h2>

<form method='post' action='views/register_user_in_db.php'>
<table border="1" style="border-collapse:collapse;">
    <tr>
        <td>Benutzergruppe:</td>
        <td><select name="typ_input_reg"><option value="1">Sch&uuml;ler</option>
<?php

include 'pulldown_function.php';
$fach_name = array('Fach');
$fach_options = array(0 => ' ', 1 => 'Mathe', 2 => 'SL', 3 => 'Englisch');
//Werte des Faecher-Arrays
$klasse_name = array('Klasse');
$klasse_options = array(0 => ' ', 1 => 'BIT06/1P', 2 => 'BIT07/1P', 3 => 'BIT08/1P');
//Werte des Klasse-Arrays
$fach_pulldown = pulli($fach_name, $fach_options);
$klasse_pulldown = pulli($klasse_name, $klasse_options);
?>

<html>
<head>
<title>Stundenbericht</title>
</head>
<body link="#000000" alink="#000000" vlink="#000000">

<h2>Stundenbericht</h2>

<table border="0">
    <tr>
        <td>Woche von <input type="text" maxlength="10" size="10" value=""> bis <input type="text" maxlength="10" size="10" value=""></td>
        <td>&nbsp; Klasse: <?php 
echo $klasse_pulldown;
?>
</td>
        <td>&nbsp; <input type="button" name="accept" value="best&auml;tigen"></td>
    </tr>
    <tr>
<?php

include 'pulldown_function.php';
$fach_name = array('Fach');
$fach_options = array(0 => ' ', 1 => 'Mathe', 2 => 'SL', 3 => 'Englisch');
//Werte des Faecher-Arrays
$fach_pulldown = pulli($fach_name, $fach_options);
?>

<html>
<head>
<title>Stundenbericht - Fachspezifisch</title>
</head>
<body link="#000000" alink="#000000" vlink="#000000">

<h2>Stundenbericht - Fachspezifisch</h2>

<table border="0">
    <tr>
        <td>Woche von <input type="text" maxlength="10" size="10" value=""> bis <input type="text" maxlength="10" size="10" value=""></td>
        <td>&nbsp; Fach: <?php 
echo $fach_pulldown;
?>
</td>
        <td>&nbsp; <input type="button" name="accept" value="best&auml;tigen"></td>
    </tr>
    <tr>
        <td align="right"><div style="font-size:11px;">Eingabeformat: JJJJ-MM-TT; 2009-06-23</div></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>