This question already has answers here:
Answer
Solution:
Your problem is here:
echo "<option value='$show'>$show</option>";
The single quotes in the variable $show
are interfering with the single quotes wrapping the value
.
Change it to this:
echo '<option value="'.$show.'">'.$show."</option>";
This explicitly concatenates the parts of the string rather than interpolating it. It gives better control over what quotes are used and where.
Source