I have an enum mysql field with a null value ''. I need that null value to be disabled in the dropdown list however it is showing the html <option> as <option/> Here is the code I have.
[code=php]
foreach($enums as $key)
{
echo "<option ".$func->iif($key==$res ults['Group'],'selected','') .">".$func->makeSafe($key) ."</option>";
}[/code]
I have also tried the following with no success either.
[code=php]
foreach($enums as $key)
{
if (is_null($key) || !isset($key))
echo "<option></option>";
else
echo "<option ".$func->iif($key===$re sults['Group'],'selected')."> ".$func->makeSafe($key) ."</option>";
}[/code]
anyone know why this displays the null option as <option/> and not <option></option>?
[code=php]
foreach($enums as $key)
{
echo "<option ".$func->iif($key==$res ults['Group'],'selected','') .">".$func->makeSafe($key) ."</option>";
}[/code]
I have also tried the following with no success either.
[code=php]
foreach($enums as $key)
{
if (is_null($key) || !isset($key))
echo "<option></option>";
else
echo "<option ".$func->iif($key===$re sults['Group'],'selected')."> ".$func->makeSafe($key) ."</option>";
}[/code]
anyone know why this displays the null option as <option/> and not <option></option>?
Comment