I need to make a record in PHP where each person is included in the list.
I must evaluate if the name of the existing color in a second arrangement that contains the name of the color and the meaning of each one, in case of finding it, it is necessary to write in a last column of the table shown, the meaning of the color, otherwise you must write the phrase "The meaning can not be found".
So far I have only been able to do the lists, but it does not show me the meaning of the color, I would appreciate it.
This is my code so far.
<!DOCTYPE html>
<html>
<head>
<title>Arreglos Listado Agenda Telefonica</title>
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1" />
</head>
<body>
<h3>Listado Agenda</h3>
<?php
/* En este programa se va a especificar la forma de
* declarar arreglos y acceder a la información que contiene
*/
//Arreglo con llaves numéricas
$cabecera=array("Nombre","Direccion","Telefono", "Fecha de Cumpleanos", "Color Favorito", "Significado");
$nombres=array("Jimmy Riera","Valera","041412345678", "05/01/1976", "Amarillo");
$direccion=array("Antonio Lopez","Motatan","041245612378", "08/02/1976", "Rojo");
$telefono=array("Paola Reverol","Pampan","04145551212", "15/12/2000", "Verde");
$fechaCumple=array("Manuela Saez","Trujillo","0272-5552212", "31/06/1999", "Rosado");
$color=array("Juan Rojo","Valera","041412345678", "05/01/1976", "Azul");
$directorio=array($cabecera,$nombres,$direccion,$telefono,$fechaCumple,$color);
$key=array("Amarillo", "Riqueza-Pureza");
$result = isset($colores[$key]) ? $array[$key] : "No se encuentra el significado";
?>
<table border="1" width="60%" cellspacing="0">
<?php
foreach ($directorio as $fila){
echo "<tr>";
foreach ($fila as $celda){
echo "<td> $celda </td>";
}
echo "</tr>";
}
?>
</table>
</p>
</body>
</html>