<?php

$select = null;
Connect();
$select = Select("Select * From app_advertising_list ");
DisConnect();

$array = array(
    "error" => 0,
    "id" => null,
    "url" => null,
    "post" => null
);
$empty = array();
if ($select != null) {
    while ($row = mysqli_fetch_assoc($select)) {
        $array['error'] = 0;
        $array['id'] = $row['ID'];
        $array['url'] = $row['URL'];
        $array['post'] = $row['POST_ID'];
        $empty[] = $array;
    }
} else {
    $array['error'] = 1;
    $empty[] = $array;
}
$decode = json_encode($empty, JSON_UNESCAPED_UNICODE);
echo $decode;