What are the best practices for dynamically generating option tags within a select tag in PHP?

When dynamically generating option tags within a select tag in PHP, it is best practice to loop through an array of options and output each option tag within the select tag. This allows for easy maintenance and scalability of the code.

<select name="dropdown">
<?php
$options = array("Option 1", "Option 2", "Option 3");

foreach($options as $option) {
    echo "<option value='$option'>$option</option>";
}
?>
</select>