<?php
// function welcome()

include('../connection.php');
// {
$sql_check = "SELECT `news_letter_date`, COUNT(`news_letter_id`) as total FROM tbl_news_letter GROUP BY `news_letter_date`";
   	$runNew = mysqli_query($link,$sql_check);
    // echo mysqli_num_rows($runNew);
    $data = [];

    // $data[]= [
    // 	'id' => 'hello'
    // ];

    // print_r(mysqli_fetch_array($runNew));


    if(mysqli_num_rows($runNew) > 0){
    	
    	echo json_encode(mysqli_fetch_assoc($runNew));
    		
    }
                     
//}

?>