array question
Posted: Tue Jul 20, 2004 10:03 pm
i have this array which fills the drop down menu
And the session will have one of those depending on the database... the problem is i always want the session var to appear first in the drop down menu and have no idea how to do this
Code: Select all
<?php
echo " <select name='cal-level'>";
$levels = array("i","p","m","im","o", $_SESSION["admin"]["cal-level"]);
$levels = array_unique($levels);
foreach ($levels as $level)
{
echo "<option>".$level."</option>";
}
echo "</select>
?>