Você está na página 1de 1

Codigo php

<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=>">
<title>Document</title>
<link rel="stylesheet" href="./css/relatorio.css">
</head>
<body>
<h2> Resultado Relatório de Clientes </h2>
<?php
$Pessoa1 =array("codigo"=>1, "nome"=> "Alberto Silva");
$Pessoa5 =array("codigo"=>2, "nome"=> "Bianca Duate");
$Pessoa3 =array("codigo"=>3, "nome"=> "João Almeida");
$Pessoa4 =array("codigo"=>4, "nome"=> "Valéria Souza");
$Pessoa5 =array("codigo"=>5, "nome"=> "Augusto Silva");
$lista=array($Pessoa1,$Pessoa2,$Pessoa3,$Pessoa4,$Pessoa5);
//var_dump($lista);
?>

<table id="tabela">

<tr>
<th> Código</th>
<th>Nome</th>
</tr>

<?php foreach($lista as $indice=>$valor){ ?>


<tr>
<?php foreach($valor as $pessoa=>$item) {
echo "<td> $item </td>";
} ?>
</tr>
<?php } ?>
</table>

</body>
</html>

Você também pode gostar