この課題の解決策を以下に示します。医師のオプションを選択するとスペシャリストのリストが非表示になり、スペシャリストを選択するとスペシャリストのリストが表示される状況が必要です。ありがとう
<tr><td colspan=2 ><strong>Doctor Locator</strong></td></tr>
<tr><td>
<?php
$doc = 'Doctors';
$spel = 'Specialist';
$medic = array($doc, $spel);
sort ($medic);
echo "<select>";
foreach ($medic as $m)
{
echo "<option value=\"$m\">$m</option>";
}
echo "</select> <br/> ";
?>
<select name="txt_specialize" style="width: 400px; height: 25px">
<?php
$specialist = array('Surgeon','Neurosurgeon','','Neurologist','Occupational Medicine Physician','Ophthalmologist',
'Oral and Maxillofacial Surgeon','Pathologist','Psychiatrist','Podiatrist','Nephrologist','Otolaryngologist',
'Internal Medicine Physician','Gastroenterologist','Emergency Physicians','Hermatologist','Dermatologist',
'Anesthesiologist','Immunologist','Orthopaedic Surgeon','Radiation Onconlogist','Gynaecologist','Dentist',
'Optician','Cardiologist','Pediatrician','Urologist','Diagnostic Radiologist','Pulmonary Medicine Physician',
'Rheumatologist','Plastic Surgeon');
sort ($specialist);
foreach ($specialist as $s)
{
echo "<option value=\"$s\">$s</option>";
}
echo "</select>"
?>
</td></tr>
<tr><td>