[eluser]C_Line[/eluser]
i have a code like this
Code:
<select name="pilih_notran">
<?php
$i=0;
foreach($query as $no)
{
$nos[$i] = $no->notrans_supplier;
$p = $_SESSION['psan'];
echo "<option id='$i' value='".$no->notrans_supplier ."' if($p == $nos[$i]){selected = 'selected';}>".$no->notrans_supplier."</option>";
$i++;
}
?>
</select>
but why it can't selected ?
thx