Advertisement
estevaorada

Animais de estimação PHP + HTML

Mar 21st, 2023
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.83 KB | None | 0 0
  1. <?php
  2.  
  3. // Array que será utilizada na atividade:
  4.  
  5. $animais = array(
  6.     array("id" => 1, "nome" => "Bolinha", "tipo" => "Cachorro", "raça" => "Poodle", "nome_proprietario" => "Maria Silva"),
  7.     array("id" => 2, "nome" => "Mimi", "tipo" => "Gato", "raça" => "Siames", "nome_proprietario" => "João Santos"),
  8.     array("id" => 3, "nome" => "Toby", "tipo" => "Cachorro", "raça" => "Beagle", "nome_proprietario" => "Lucas Souza"),
  9.     array("id" => 4, "nome" => "Luna", "tipo" => "Gato", "raça" => "Persa", "nome_proprietario" => "Isabela Oliveira"),
  10.     array("id" => 5, "nome" => "Billy", "tipo" => "Cachorro", "raça" => "Bulldog", "nome_proprietario" => "Rafaela Silva"),
  11.     array("id" => 6, "nome" => "Mel", "tipo" => "Gato", "raça" => "Siamês", "nome_proprietario" => "Sofia Costa"),
  12.     array("id" => 7, "nome" => "Ted", "tipo" => "Cachorro", "raça" => "Labrador", "nome_proprietario" => "Pedro Alves"),
  13.     array("id" => 8, "nome" => "Mila", "tipo" => "Gato", "raça" => "Angorá", "nome_proprietario" => "Gustavo Lima"),
  14.     array("id" => 9, "nome" => "Nina", "tipo" => "Cachorro", "raça" => "Vira-Lata", "nome_proprietario" => "Ana Oliveira"),
  15.     array("id" => 10, "nome" => "Bela", "tipo" => "Gato", "raça" => "Persa", "nome_proprietario" => "Bruno Santos")
  16. );
  17.  
  18. // Abaixo o código HTML:
  19. ?>
  20.  
  21.  
  22. <!doctype html>
  23. <html lang="en">
  24.  
  25. <head>
  26.     <meta charset="utf-8">
  27.     <meta name="viewport" content="width=device-width, initial-scale=1">
  28.     <title>Listagem de Animais</title>
  29.     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
  30. </head>
  31.  
  32. <body>
  33.     <div class="container">
  34.         <h1>Lista de Animais de Estimação</h1>
  35.  
  36.         <!-- Tabela: Lista os animais do array na tabela abaixo: -->
  37.         <table class="table">
  38.             <thead>
  39.                 <tr>
  40.                     <th>ID</th>
  41.                     <th>Nome</th>
  42.                     <th>Tipo</th>
  43.                     <th>Raça</th>
  44.                     <th>Nome do Proprietário</th>
  45.                 </tr>
  46.             </thead>
  47.             <tbody>
  48.                 <!-- Registro de Exemplo: Utilize como base para realizar a estrutura em PHP -->
  49.                 <tr>
  50.                     <td>1</td>
  51.                     <td>Nome do Animal</td>
  52.                     <td>Tipo do Animal</td>
  53.                     <td>Raça do Animal</td>
  54.                     <td>Dono do Animal</td>
  55.                 </tr>
  56.             </tbody>
  57.         </table>
  58.     </div>
  59.  
  60.  
  61.  
  62.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
  63. </body>
  64.  
  65. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement