<?php
if ($all_courses) {
    foreach ($all_courses as $course_value) {
        ?>
            <input  type="radio"
                    data-errormessage-value-missing="Course Type is Required!" 
                    class="form-control validate[required] text-input"
                    name="course_id" id="course_id<?php echo $course_value->course_id; ?>" 
                    value="<?php echo $course_value->course_id; ?>">
            <label for="<?php echo $course_value->course_name; ?>"><?php echo $course_value->course_name; ?></label>
            <input type="hidden" id="course_name<?php echo $course_value->course_id; ?>" value="<?php echo $course_value->course_name; ?>"> 
            <div class="col-lg-12"><br></div>
            <span><br></span>

        <?php } ?>
        <input type="submit" class="btn btn-success" value="Add Course" data-dismiss="modal" onclick="setCourse();" >
<?php } else { ?>
    <span><br>
        You do not have any Course in this Category
    </span>
    <?php
} 

