I'm using Smarty to generate some tables, and at one point I'm printing out variable values that have been passed from php file. The problem is that some of these variables are Boolean values and they render as "1" or "". This was my attempt to transform these Boolean values to a human readable format. It does not work. How can can I check if a variable is a Boolean value?
{if $val2.$value_index === true}Yes
{else if $val2.$value_index === false}No
{else}{$val2.$value_index->value}{/if}
I'm not exactly familiar with this, but it looks as though that should be:
{if $val2.$value_index->value === true}Yes
{elseif $val2.$value_index->value === false}No
{else}{$val2.$value_index->value}{/if}