<?php

header("Access-Control-Allow-Origin: *");
//$data=array('8ndhidEmUbI', 'NVLVZzfJXiA', 'XBIRnU4YCVY', 'fkxsiKCnL_A');
require 'database.php';
$url = $_GET['video_id'];
$result = mysqli_query($con,"SELECT * FROM videos where video_id='$url'");
while( $row = mysqli_fetch_assoc( $result)){
    $new_array[] = $row; // Inside while loop
}


mysqli_close($con);

echo json_encode($new_array);


   
?>