Try
foreach ($form['ttd_tid']['und']['#options'] as $tid => $term){
If that dont work using the following within you form alter it will print out the array to /admin/reports/dblog when you load the page
watchdog('$form', '<pre>'.print_r($form, true).'</pre>');