+function pulldown_options_array($options) {
+ if($options) {
+ $pulldown_options = array();
+ foreach($options as $option) {
+ $option = preg_replace("/['\\\\]/", '\\\\$0', $option);
+ $pulldown_options[] = "'$option'";
+ }
+ $pulldown_options = 'array(' . join(', ', $pulldown_options) . ')';
+ } else {
+ $pulldown_options = "array(array('op1', 'Option One'), array('op2', 'Option Two'), 'n/a')";
+ }
+
+ return $pulldown_options;
+}
+