Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Prueba de variables
- $n1= 30;
- $n2= 214;
- $f= "esto es la firma";
- echo $n1 + $n2, " es un numero cojonudo ", $f;
- ?>
- <br>
- <?php
- // Matrizes Indezeadas
- $datos = array ("Paco ", "15 ", "10.5 ", "true "); /*Se puede por 1=> para que empieze por uno, o el numero a escoger*/
- $t = "2";
- $datos[50] = "LOL ";
- $nd = count ($datos);
- echo "Nombre: ", $datos[0], "Edad: ", $datos[1], "Indice de subnormalidad: ", $datos[$t], "Is idiot: ", $datos[3], $datos[50], $nd;
- ?>
- <br>
- <?php
- // Matrizes Asociativas
- $dt = array ("nombre"=> "Pepe ", "edad"=>"52 ", "tlf"=>"922241095 ");
- echo "Nombre: ", $dt["nombre"], "Edad: ", $dt["edad"], "Telefono: ", $dt["tlf"];
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement