This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$aPaises = array(); | |
$aPaises[] = 'Chile'; | |
$aPaises[] = 'Nigeria'; | |
$aPaises[] = 'Ecuador'; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Autocargador de librerias **/ | |
spl_autoload_register('autocargador'); | |
function autocargador($insNom) | |
{ | |
include $insNom . '.class.php'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static $NOMBRE = 'Los manicos'; | |
echo Panaderia::$NOMBRE; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHP_EOL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Clase abstracta **/ | |
abstract class Remolque | |
{ | |
//Fuerza la extensión de clase para definir estos métodos | |
abstract public function enganchar(); | |
abstract public function soltar(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="miId">Lorem ipsum dolor sit amet.</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Simple */ | |
SELECT columnas FROM tablas WHERE filtro; | |
SELECT * FROM vecinos; | |
SELECT * FROM vecinos WHERE perro = '1'; | |
/* Contar número de resultados */ | |
SELECT count(*) FROM vecinos; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Insertar */ | |
INSERT INTO usuarios VALUES ('', 'Lisa'); | |
INSERT INTO usuarios (nombre, id) VALUES | |
('Flanders', NULL); | |
/* Consulta */ | |
SELECT * FROM usuarios; | |
SELECT nombre FROM usuarios; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('a.top').click(function(){ | |
$('html, body').animate({scrollTop : 0},800); | |
return false; | |
}); | |
//HTML | |
<a class="top" href="#">Arriba</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('img').load(function() { | |
//se cargaron las imagenes completamente | |
}); |