Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 26, 2023 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/338f587f1d625505149e1c1fc6a5ed62 to your computer and use it in GitHub Desktop.
Save parzibyte/338f587f1d625505149e1c1fc6a5ed62 to your computer and use it in GitHub Desktop.
<?php
if (!isset($_GET["id"])) {
exit("No hay id");
}
$id = $_GET["id"];
$datos = [
"id" => $id,
"productos" => [
[
"nombre" => "Alcohol isopropílico",
"precio" => 20,
],
[
"nombre" => "Mouse razer",
"precio" => 500,
],
],
"fecha" => date("Y-m-d"),
];
echo json_encode($datos);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment