Created
January 29, 2014 19:10
-
-
Save tanrax/8694735 to your computer and use it in GitHub Desktop.
PHP: Enviar array con POST
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'; | |
?> | |
<form action="arraysMostrar.php" method="post"> | |
<input type='hidden' name='paises' value='<?php echo serialize($aPaises); ?>' /> | |
<input type="submit"> | |
</form> | |
<?php | |
//En el otro documento | |
print_r(unserialize($_POST['paises'])); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment