如何在php中显示数据(由bool类型的表列名称分成2)

In my php class i get a result from query and would like to display the data on 2 columns bases on the value from the db table(active or inactive). I would like to have something like this:

active             inactive
supplier name a    supplier name d
supplier name b    supplier name e
supplier name c    supplier name f

This is my code:

while ($sensor_row = $result_of_query->fetch_assoc()) {
    if ($sensor_row['active'] == 0) {
        $status = 's_on';

        $thisSensor = '<div class="statusTitle">Active Suppliers</div>';
        $thisSensor .= '<div class="row clearfix sensor ' . $sensor_row['id'] . '">';
        $thisSensor .= '    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">';
        $thisSensor .= '        <div class="card">';
        $thisSensor .= '        <div class="body ' . $status . '">&nbsp;</div>';
        $thisSensor .= '        </div>';
        $thisSensor .= '    </div>';
        $thisSensor .= '</div>';

        echo $thisSensor;
    } else if ($sensor_row['active'] == 1) {
        $status = 's_on';

        $thisSensor = '<div class="statusTitle">Inactive Suppliers</div>';
        $thisSensor .= '<div class="row clearfix sensor ' . $sensor_row['id'] . '">';
        $thisSensor .= '    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">';
        $thisSensor .= '        <div class="card">';
        $thisSensor .= '        <div class="body ' . $status . '">&nbsp;</div>';
        $thisSensor .= '        </div>';
        $thisSensor .= '    </div>';
        $thisSensor .= '</div>';

        echo $thisSensor;
    }
}