Skip to content

Instantly share code, notes, and snippets.

@tanrax
Created January 29, 2014 19:10
Show Gist options
  • Save tanrax/8694735 to your computer and use it in GitHub Desktop.
Save tanrax/8694735 to your computer and use it in GitHub Desktop.
PHP: Enviar array con POST
<?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