<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 you are printing the two, but it was to print according to the status in the table.
What's wrong?