Can anyone tell me what I'm doing wrong with this switch statement? The $ is in the database as text. Either $, $$, $$$, $$$$. switch ($_row['price']) { case $: echo "<\$15"; break; case $$: echo "<\$20"; break; case $$$: echo "<\$25"; break; case $$$$: echo ">\$25"; break; default: echo "No Average Specified"; } Code (markup):
Nevermind stupid mistake I had $_row instead of $row .... duh (it was a post variable and I changed it forgetting to remove the _)