I am trying to loop through the values of 10 to 50 and insert them into a drop down box. That works. I have a variable called $startissue that is a value between 10 and 50 depending on the customer. When it gets to the point where $i is the same as $startissue, I want it to echo the "selected" option for that row so it shows up as their value... it isn't working though. If I set the if statement to (if $i == 16) for example, it sets 16 as their active number... it's like my $startissue variable is empty, but if I echo it to the page as text I get the correct value. Anyone see where it is getting tripped up?
while ($row = mysql_fetch_array($findsubscriber_result)) {
$startissue = $row["startissue"];
.
.
.
for ($i = 10; $i<=50; $i++) {
if ($i == $startissue) {
echo "
<option value=\"$i\" selected> $i </option>
";
}
echo "
<option value=\"$i\"> $i </option>
";
}
}