<?php
    header('Access-Control-Allow-Origin: *');
    header('Access-Control-Allow-Methods: GET, POST');
    header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
    include '../../config/index.php';
    $data = array();
    $sql="select * from tags_courses WHERE course_id='".$_GET["course"]."'   ";
    $result = mysqli_query($conn, $sql);  
    if (mysqli_num_rows($result) > 0) {
        while($row = mysqli_fetch_assoc($result)) {
            $new_array = array(
                'key' => $row["course_tags_id"],
            );
            array_push($data, $new_array);
        }
    }
    echo json_encode($data);


  
?>