Here is my code snippet:
echo "<tr>
<td>Fruits</td>
<td>
<input type='radio' name='fruit' value='Apple' ($fruit=='Apple')?'checked':''> Apple
<input type='radio' name='chamber' value='Banana' ($fruit=='Banana')?'checked':''> Banana</td>
</tr>";
Value of $fruit
is Apple
but still the the radio button attribute is not being set to checked
.