<p>I have a form that is sending in sizes of things, and I need to see what the strings are equal to so that I can set the price accordingly. When i try to do this, it says that they are not equal, and i get no prices. This is the code i'm using:</p>

<pre><code>if ($_POST['sizes'] == "Small ($30)"){$total = "30";}
if ($_POST['sizes'] == "Medium ($40)"){$total = "40";}
if ($_POST['sizes'] == "Large ($50)"){$total = "50";}
else {$total = $_POST['price'];}
</code></pre>

<p>What am i doing wrong here? I can echo $_POST['sizes'] and it gives me exactly one of those things.</p>

Try using single quotes
```
```
if ($_POST['sizes'] == 'Small ($30)'){$total = "30";}
elseif ($_POST['sizes'] == 'Medium ($40)'){$total = "40";}
elseif ($_POST['sizes'] == 'Large ($50)'){$total = "50";}
else {$total = $_POST['price'];}
```
```
Double quoted strings use variable interpolation, so the $ symbol becomes significant! See
this manual page
for the differences in how you can declare string literals in PHP.
(Edited to correct the logic error - as others noted, a switch would be much clearer here)