Advertisement
Guest User

Untitled

a guest
May 27th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2. // Prueba de variables
  3.     $n1= 30;
  4.     $n2= 214;
  5.     $f= "esto es la firma";
  6.  
  7.     echo $n1 + $n2, " es un numero cojonudo ", $f; 
  8. ?>
  9. <br>
  10. <?php
  11.     // Matrizes Indezeadas
  12.     $datos = array ("Paco ", "15 ", "10.5 ", "true "); /*Se puede por 1=> para que empieze por uno, o el numero a escoger*/
  13.     $t = "2";
  14.     $datos[50] = "LOL ";
  15.     $nd = count ($datos);
  16.         echo "Nombre: ", $datos[0], "Edad: ", $datos[1], "Indice de subnormalidad: ", $datos[$t], "Is idiot: ", $datos[3], $datos[50], $nd;
  17.  ?>
  18.  <br>
  19.  <?php
  20.     // Matrizes Asociativas
  21.     $dt = array ("nombre"=> "Pepe ", "edad"=>"52 ", "tlf"=>"922241095 ");
  22.         echo "Nombre: ", $dt["nombre"], "Edad: ", $dt["edad"], "Telefono: ", $dt["tlf"];
  23.   ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement