Tell me, I deduce the values in option from the option , the problem is that all the values are output from the marka line, it turns out a lot of option with the same value in this case Toyota ... I tried to add the line marka_id to mysql and only write one value there, but empty option fields have appeared, it may somehow try to output a bunch of strings id + marka, only I don’t know how to implement it.
<select class="filtr__select" id="idcat"> <option id="marka-avto">марка</option> <?php //Выводим категории и ее ID while ($row=mysql_fetch_assoc($result)) { $id = $row['id']; // иднтификатор $marka = $row['marka']; echo "<option value=\"$id\">$marka</option>"; } ?> </select>
$resultitself, the query itself to the database. - Manitikyl$idinoption? For exampleid : 1 , marka : toyotaandid : 2 , marka : toyota, what are you going to do with this? - Manitikyl