<?php
$polaczenie = mysqli_connect("172.18.0.4", "root", "secret", "db");

//$kwerenda = mysqli_query($polaczenie, "SELECT id, nazwa, cena, data_dodania FROM menu ORDER BY id DESC LIMIT 3;");
$kwerenda = mysqli_query($polaczenie, "SELECT * FROM menu ORDER BY id ASC");

$json = array();

while ($row = mysqli_fetch_assoc($kwerenda)) {
    $json[] = $row;
}

mysqli_close($polaczenie);

echo json_encode($json );
?>
