FYI this was beginning to bug me out... so I decided to try the trim function.... and walla... it worked. Thanks for ya'll assistance. ----------------------------------------------------------------------------------- $eventQuery=ifx_query('select * from event' .' where e_date >= today ' .' and e_status in ("O","C") ' .' and out_id is not null ' .' order by s_acro, e_acro ',$db) or die (ifx_error()); while($cols=ifx_fetch_row($eventQuery)) { if (trim($cols['out_type'])=='0') { $r_away['linetype']='L'; $r_home['linetype']='L'; } elseif (trim($cols['out_type'])=='1') { $r_away['linetype']='H'; $r_home['linetype']='H'; } if (trim($cols['s_acro'])=='CF' || trim($cols["s_acro"])=='PF') { $r_away['sport']='1'; $r_home['sport']='1'; $s_lt='PS'; $t_lt='TP'; } elseif (trim($cols['s_acro'])=='PB' || trim($cols['s_acro'])=='CB') { $r_away['sport']='2'; $r_home['sport']='2'; $s_lt='PS'; $t_lt='TP'; } elseif (trim($cols['s_acro'])=='B') { $r_away['sport']='3'; $r_home['sport']='3'; $s_lt='ML'; $t_lt='TM'; } elseif (trim($cols['s_acro'])=='H') { $r_away['sport']='4'; $r_home['sport']='4'; $s_lt='ML'; $t_lt='TM'; } $r_away['rotation']=$cols['out_id']; $r_home['rotation']=($r_away['rotation'] + 1); echo "".$r_away['rotation']." , ".$r_home['rotation']." , ".$r_away['linetype']." , ".$r_home['linetype']." , ".$r_away['sport']." , ".$r_home['sport']."\n"; }