-6
<td>
   <? if($online['status']==1){?>
    <span class="badge badge-primary"><?php echo lang('texto um'); ?></span>
   <?}else{?>
   <? }?>
   <?if($online['status']==2){?>
     <span class="badge badge-danger"><?php echo lang('texto dois'); ?></span>
   <? }else{?>
   <? }?>
   ...
</td>
In the table is printing both, but it was to print according to the status in the table.
What is wrong?
And what is the value of
$online['status']? Take care of the loose comparison, she can fool you in many situations.– Woss
Varies from 1 and 4 . Always prints the four texts instead of only the text corresponding to the status
– Leandro Borges
Check if the value is coming right? Give a
var_dump($online)and post the result.– Woss