<div class="alert alert-success">
                Assigned
            </div>
        </div>
        <div class="col-xs-2"></div>
        <div class="col-xs-5">
            <div class="alert alert-danger">
                Unassigned
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-5">
            <?php 
$classes = getPostTypeData('post_type_batch');
$query = $wpdb->get_results("select * from instiute_has_batch where institute_id = " . $batchId);
$available = array();
?>
            <select name="assgined[]" id="multiselect" class="form-control" size="10" multiple="multiple">
                <?php 
foreach ($query as $value) {
    ?>
                    <option value="<?php 
    echo $value->batch_id;
    ?>
"><?php 
    echo $classes[$value->batch_id];
    ?>
</option>
                    <?php 
            <div class="alert alert-success">
                Assigned
            </div>
        </div>
        <div class="col-xs-2"></div>
        <div class="col-xs-5">
            <div class="alert alert-danger">
                Unassigned
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-5">
            <?php 
$classes = getPostTypeData('post_type_class');
$query = $wpdb->get_results("select * from batch_has_classes  where batch_id = " . $postBatch);
$available = array();
?>
            <select name="assgined[]" id="multiselect" class="form-control" size="10" multiple="multiple">
                <?php 
foreach ($query as $value) {
    if (isset($classes[$value->class_id])) {
        ?>
                        <option value="<?php 
        echo $value->class_id;
        ?>
"><?php 
        echo $classes[$value->class_id];
        ?>
</option>
            </div>
        </div>
        <div class="col-xs-2"></div>
        <div class="col-xs-5">
            <div class="alert alert-danger">
                Unassigned
            </div>
        </div>
    </div>



    <div class="row">
        <div class="col-xs-5">
            <?php 
$subjects = getPostTypeData('post_type_subject');
$query = $wpdb->get_results("select * from class_has_subject  where class_id = " . $classID);
$available = array();
?>
            <select name="assgined[]" id="multiselect" class="form-control" size="10" multiple="multiple">
                <?php 
foreach ($query as $value) {
    if (isset($subjects[$value->subject_id])) {
        ?>
                        <option value="<?php 
        echo $value->subject_id;
        ?>
"><?php 
        echo $subjects[$value->subject_id];
        ?>
</option>
            <div class="alert alert-success">
                Assigned
            </div>
        </div>
        <div class="col-xs-2"></div>
        <div class="col-xs-5">
            <div class="alert alert-danger">
                Unassigned
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-5">
            <?php 
$classes = getPostTypeData('class');
$query = $wpdb->get_results("select * from batch_has_classes where batch_id = " . $batchId);
wp_reset_query();
$available = array();
?>
            <select name="assgined[]" id="multiselect" class="form-control" size="10" multiple="multiple">
                <?php 
foreach ($query as $value) {
    ?>
                    <option value="<?php 
    echo $value->class_id;
    ?>
"><?php 
    echo $classes[$value->class_id];
    ?>
</option>