如何修复由数据库填充的选择列表返回的奇数值

Using PHP I'm populating a dropdown list with values taken from a MySQL database. The list displays fine, my problem comes when I try to retrieve the selected value. I'm defining a variable and passing it the dropdownlist name for the POST array:

$variable = $_POST['dropdownlist'];

but the contents of $variable are \{value}"

Why is it putting in the \{ and }", and how do I get rid of them to get a value I can actually use?

If you are getting curly brackets as part of the value then the chances are they are their in your HTML code. Your code is likely something like echo '{$value}'; rather than echo "{$value}"; or something similar.