Multiple TinyMCE editors in dynamically generated textareas

I have text-areas dynamically populated in the admin section of my custom post type.

             <div class="media_div">
                <input type="text"

I then loop through the $_POSTS when saving the meta values, hence using [] in the name. The codex says only lowercase and _ can be passed to wp-editor.

How can I use wp-editor for these dynamically generated text areas?

wp_editor($ID, 'media_desc[]');

Solutions Collecting From Web of "Multiple TinyMCE editors in dynamically generated textareas"

The second parameter to wp_editor is the value that the “id” attribute of the textarea element will have, and that is probably why there are such restrictions on it. By default it is also used for the “name” attribute but you can set it explicitly by using the $settings parameter to wp_editor

wp_editor($ID, 'media_desc_n',array('textarea_name' => 'media_desc[n]'));