For some reason this function OMITS this very first row of my vType query.

The $vType is the name of my List
The $FieldValue is the value in the field associated record I am building the options for. It can contain a single or MULTIPLE values.

I appreciate any help that can be offered ;-)

function Get_Menu_Selected ($vType, $FieldValue) {

$options .= "<option value=\"\"></option>\n";
$qry = "select `vValue` FROM `vLists` where `vType`='$vType' ORDER BY `Sort` ASC";
$result=mysql_query($qry);
$row=mysql_fetch_array($result);
$vValue = $row['vValue'];
$selected = explode('\r',$FieldValue);
//$options = '';

while($row=mysql_fetch_array($result)) {
$inst = $row['vValue']; 
  $sel = '';
  if ( in_array($inst,$selected) ) {
	$sel = 'selected="selected " ';
  }
  $options .= "<option {$sel}value=\"{$inst}\">{$inst}</option>\n";
} return $options;
}
$row=mysql_fetch_array($result);
$vValue = $row['vValue'];

You're fetching one row before your while loop so its essentially doing nothing with the first row

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.