How can the value of "anr" be passed to each value element in a dropdown list using a while loop in PHP?

To pass the value of "anr" to each value element in a dropdown list using a while loop in PHP, you can create an array of values that you want to display in the dropdown list. Then, use a while loop to iterate through the array and output the options with the value of "anr" for each element.

<?php
// Define the array of values for the dropdown list
$values = array("Option 1", "Option 2", "Option 3");

// Initialize the value of "anr"
$anr = "anr";

// Output the dropdown list using a while loop
echo '<select>';
$i = 0;
while ($i < count($values)) {
    echo '<option value="' . $anr . '">' . $values[$i] . '</option>';
    $i++;
}
echo '</select>';
?>