i have issue with making default text in my select. (option list). So, my option is storage in database. Like varchar Test Option
Now if i make like this in my code
<select name="category"> <option selected="selected"><?=$ad['category']?></option> <?php echo $options; ?> </select> it working, but in my list be two same values then. my full code.
<?php while($category = mysqli_fetch_array($q)):; ?> <option> value="<?php echo $category[0];?>" <?php echo $category[1];?> </option>" <?php endwhile; ?> <select name="category"> <option selected="selected"><?=$ad['category']?></option> <?php echo $options; ?> </select> <?php My code for function q and pick value from database (all value from option is from database)
$q2 = mysqli_query($con,$q22222); $options = ""; while($row2 = mysqli_fetch_array($q2)) { $options = $options."<option>$row2[1]</option>"; } picture what explain situation more. 
any idea how to solve it ? all help will be appreciated
$qand$q2just revisions of the same code? Where does the selected value come from, is it user input?<option>…</option>in a loop first, and then directly after that comes a<select>?