mardi 13 septembre 2016

Am I using the ternary operator?

Here is my code:

echo "<option value=".$crew_rank_id.".(($crew_rank_id == $crew_rank) ? "selected" : "").>".$crew_rank_table."</option>";

what im trying to do is echo out the selected value from the database in echo

Aucun commentaire:

Enregistrer un commentaire