--- In [email protected], "Gordon Stewart" <[EMAIL PROTECTED]> wrote: > > Why don't you simply do a preg_match ? > > for ($i=0; $i<$number; $i++) { > $bearing = mysql_result($result,$i,"bearing"); > if(preg_match("/\w+/",$bearing)){ > print "<option value=\"$bearing\">$bearing</option>"; > } > } > > > As to getting the blank results into the database in the first place - > what code do you use there ? > > (do you want to eliminate / stop blank results from getting into the database ?) >
Worked pretty slick - thank you Sir... :-) The reason for some unwanted white spaces is that I'm using a table specifically for database choices and an input form queries that specific table column to populate a pull down selection. i.e. column1=id, column2=bearing, column3=seal, etc; so when a new bearing is written to the table, auto-increment on 'id' progresses one more row and leaves a blank field in seal and any others. Probably not the best solution but the table is relatively small and likely wouldn't grow much. John
