What is the common syntax error encountered when trying to fill a dropdown menu with data from a database in PHP?

When trying to fill a dropdown menu with data from a database in PHP, a common syntax error is forgetting to enclose the PHP code within the opening and closing PHP tags. This can result in the PHP code being treated as plain text and not being executed. To solve this issue, ensure that the PHP code for retrieving data from the database and populating the dropdown menu is enclosed within the PHP tags.

<select name="dropdown">
<?php
// Connect to the database and retrieve data
// Assume $data is an array containing the dropdown options
foreach ($data as $option) {
    echo "<option value='" . $option['value'] . "'>" . $option['label'] . "</option>";
}
?>
</select>