Created
October 20, 2015 15:40
-
-
Save labra/9bbcc9163c4fedce2196 to your computer and use it in GitHub Desktop.
PHP example with arrays
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
$personas = array("juan","luis","ana"); | |
print($personas[1]); // luis | |
$personas[3] = "pepe"; // Inserta un valor en posición 3 | |
$personas[] = "kiko"; // Inserta valor al final | |
foreach($personas as $p) { | |
echo $p . " "; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment