Hi Guys,
i have a list of records that i'm displaying in a table, in which i have two select boxes. i managed to populate the options and select the appropriate value but i believe it was inefficient. here is how i do it.
in the table loop, i call a function that queries a table and create a string

PHP Code:
// function im calling
while($row mysql_fetch_array($aJobs))
{
$sOptionSelected='';
if (
$row['job_id']==$jobId){$sOptionSelected='SELECTED';}

$sJobOptions$sJobOptions '<option value="'.$row['job_id'].'"'.$sOptionSelected.'>'$row['job_desc'] .'</option>';

is there a better approach to do so? ?
thanks