Try this instead, it's a little bit cleaner:
$count = $_POST['count'];
$array_course = $_POST['array_course'];
$array_index_key = $_POST['array_index_key'];
for ($i = 1; $i <= $count; $i++) {
$query = "UPDATE training_workshops SET " .
" display_flag = '$array_course[$i]' " .
" WHERE index_key='$array_index_key[$i]'";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
}
Mainly because $HTTP_POST_VARS and $HTTP_GET_VARS have been depreciated and $POST and $GET are the replacement. Plus, there is no need to reset the array variables each loop.