Skip to content

Instantly share code, notes, and snippets.

@micahredding
Forked from ewillhite/gist:7457150
Last active December 28, 2015 06:29
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 micahredding/7457180 to your computer and use it in GitHub Desktop.
Save micahredding/7457180 to your computer and use it in GitHub Desktop.
<?php
function states_submit($form, &$form_state) {
$i = 0;
while(isset($form_state['values']['states_' . $i])) {
variable_set('state_' . $i, $form_state['values']['states_' . $i]);
$i++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment