Skip to content

Instantly share code, notes, and snippets.

@elliotwms
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elliotwms/1828443a2ec7e066bdf9 to your computer and use it in GitHub Desktop.
Save elliotwms/1828443a2ec7e066bdf9 to your computer and use it in GitHub Desktop.
<?php
// Long winded...
$option_a = $_POST['option_a'];
$option_b = $_POST['option_b'];
$option_c = $_POST['option_c'];
$option_d = $_POST['option_d'];
$option_e = $_POST['option_e'];
// Slightly better...
$options = [
'a' => $_POST['option_a'];
'b' => $_POST['option_b'];
'c' => $_POST['option_c'];
'd' => $_POST['option_d'];
'e' => $_POST['option_e'];
];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment