Florian Lorétan is a web developer, a musician and an open-source advocate.
The problem: you need to turn the values of an HTML select element into a PHP array, and you don't want to do it by hand because it has a lot of entries.
The solution: regular expressions! (using Eclipse's regex search/replace).
<option value="(\w)">(.)</option>'$1' => '$2',<select> tags with array( and );Tags: regular expressions, php, eclipse, drupal