I am using this code to read from a paper database and display the result in a dropdown menu in out website. What I am trying to do is skip the entries that have the resolution field less than 2880 (elseif($paper_types_4800[$x+5]) < 2880 in the code below). I've gotten it to just echo blank spaces in the dropdown menu but they can still be selected and submitted. How to I skip these entries entirely in the dropdown menu?
<?php
echo '<option selected value="NULL">Please Select Your Paper Type</option>';
for($x = 0; ($no_4800_papers * 6) > $x;$x = ($x + 6)) {
echo '<option value="' . $paper_types_4800[$x] . ':' . $paper_types_4800[$x+3] . ':' . $paper_types_4800[$x+4] . ':' . $paper_types_4800[$x+2] . '">';
//SPECIAL EXCEPTION FOR USER SUPPLIED PAPER --- DISPLAY WITHOUT WIDTH AND HEIGHT
if($paper_types_4800[$x+3] == 0 && $paper_types_4800[$x+4] == 0) {
echo '' . $paper_types_4800[$x] . ', ($' . $paper_types_4800[$x+2] . ')</option>';
}
elseif($paper_types_4800[$x+5] < 2880) {
echo '' . $paper_types_4800[$x] . ', ' . $paper_types_4800[$x+3] . '" x ' . $paper_types_4800[$x+4] . '" ($' . $paper_types_4800[$x+2] . ') [' . $paper_types_4800[$x+5] . 'dpi Only]</option>';
}
else {
echo '' . $paper_types_4800[$x] . ', ' . $paper_types_4800[$x+3] . '" x ' . $paper_types_4800[$x+4] . '" ($' . $paper_types_4800[$x+2] . ')</option>';
}
}
?>