Trouble with SWITCH function in Radio Button group
I can't seem to get this SWITCH to check the radio button based on the current value box. This is being used in and UPDATE form
PHP Code:
Current value of listing:
<input name="current_value" type="text" class="formelements" id="current_value" value="<? print "$new_used"; ?>" size="10">
Edit listing to be
<?
// CHECKS TO SEE WHAT THE CURRENT VALUE IS AND POPULATES THE CORRECT RADIO BUTTON BELOW
$value = 'current_value';
switch ($value === 0 ? '' : $value) {
case 'new':
echo $new = true;
break;
case 'used':
echo $used = true;
break;
}
?>
<input name="new_used" type="radio" class="formelements" id="new" value="new">new or
<input name="new_used" type="radio" class="formelements" id="used" value="used">pre-owned