samedi 23 juin 2018

I want make html option checked with condition from mysql data

so how to make condition in echo php, i have code the scanario is, data will edit and ind option will output value checked at same in database

<select required="" class="form-control select2_category" name="dokter">
   <option>Pilih Dokter....</option>
     <?php foreach ($dokter as $r) {
        echo "<option value='$r->dokter_name'>$r->dokter_name</option>";
       }
    ?>

Aucun commentaire:

Enregistrer un commentaire