<?php
$this_value = '';
if ( is_array( $value ) ) {
   $this_value = urlencode( serialize( $value ) );
} else {
   $this_value = $value;
}
?>
<input type="hidden" name="<?php echo($name); ?>" value="<?php echo( $this_value ); ?>">
