if tag is also available in the foreach tag.
$assign['sample_foreach6'][] = array('id'=>1);
$assign['sample_foreach6'][] = array('id'=>TRUE);
$assign['sample_foreach6'][] = array('id'=>0);
$assign['sample_foreach6'][] = array('id'=>FALSE);
$assign['sample_foreach6'][] = array('id'=>'String');
$assign['sample_foreach6'][] = array('id'=>null);
{{ @foreach sample_foreach6 }}
{{ @if .id === null }}
if : null<br>
{{ @elseif .id === 0 }}
elseif : 0<br>
{{ @elseif .id === TRUE }}
elseif : TRUE<br>
{{ @else }}
else : {{ .id }}<br>
{{ @endif }}
{{ @endforeach }}
else : 1
elseif : TRUE
elseif : 0
else :
else : String
if : null