如何在 PHP 中显示状态,而不是数字,而是实际的文本?

How to show status in PHP, not the number, but the actual text?

我想从用户数据库中获取数据库中的数据。 在我的数据库中,状态是数字,如 1 和 0。 我想在1时以“活跃”或“不活跃”的形式显示用户的状态,因此分别为“活跃”和“活跃”。

<tr>
  <td>Status:</td>
  <td><?= $user_data['status'] ?></td>
  
</tr>
<td><?= $user_data['status'] == 1 ? 'active' : 'not active' ?></td>