Here's the code for the query. The code that builds the select box is the for-loop above. I'm using the PEAR API, just as an FYI.
$query = "select id, name from persona";
$result = $db->query($query);
$numRows = $result->numRows();
The $db variable is, obviously, just an open link to a MySQL database. The persona table holds an auto-incrementing ID number, a name, and a couple text blobs.
Like I said before, though, I don't think it's the SQL that's messed up. I tried the same thing, creating a select box with multiple selections. It was all done with a static PHP page that loaded a seperate PHP page and I got the same behavior.
My coworker suggested writing a function to just cut off the stuff at the end of the array, which is what I'll probably end up doing. Still, I'm curious as to why this happens.