I have form with select option from MySQL table. Because I want unique option I add SELECT DISTINCT... But I have values like: R15 and R15C now I want to combine this two to only 15 show in select option?
Curent code:
$result = $conn->query("SELECT DISTINCT diameter FROM tires WHERE cat = 'cars' ORDER BY diameter ASC"); while($rows = $result->fetch_assoc()){ $diameter = $rows['diameter']; ?>
<option value="<?php echo $diameter; ?>"><?php echo $diameter; ?></option>