forked from obetancourthunicah/IF412NegociosWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathejercicio3.php
39 lines (32 loc) · 858 Bytes
/
ejercicio3.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
$arreglo = array(1,2,3,4,"Texto",true);
print_r($arreglo);
echo "</br>";
$arreglo2= array("nombre"=>"Fulano","apellido"=>"Detal","edad"=>20);
print_r($arreglo2);
echo "</br>";
$arreglo2[]= "Esto no tiene llave";
$arreglo2["titulo"]= "Sir";
print_r($arreglo2);
$personas[]=array();
$personas[]=$arreglo2;
$personas[]=$arreglo;
$arreglo2["locura"]=$personas;
$personas["3"]=$arreglo2;
echo "</br>";
echo "</br>";
echo "</br>";
print_r($personas);
echo "</br>";
echo "</br>";
foreach($personas as $key => $value){
echo "$key -> ";
if(is_array($value)){
foreach($value as $key2 => $value2){
echo "</br>............$key2 -> $value2";
}
}else{
echo $value;
}
}
?>