I have written a case as shown below,
case 'yesno':
{
if ($reg['answer'])
{
$reg['answer'] = $phrase['_yes'];
}
else
{
$reg['answer'] = $phrase['_no'];
}
//below line is to be corrected
($reg['answer'] =$phrase['_yes'])? $show['answer_icon'] = true : $show['answer_icon'] = false;
echo $show['answer_icon'];
break;
}
I need to show an image as result only if
$reg['answer'] = $phrase['_yes'];
But right now the condition which I have written for that is showing error(above comemnted line)
It shows all result with an image,irrestpective of yes or no when I write the below condition
($reg['answer'])? $show['answer_icon'] = true : $show['answer_icon'] = false;
Can any one suggest the right condition for this… Showing an image part has been done.
Close buddy. Try this: