Using Drupal batch API we can create batch processes. // form submit. function product_display_submit($form, &$form_state) { $products = $form_state['input']['product_table']; if (!empty($products)) { // Remove empty values. $emptyRemoved = remove_empty($products); // re-index array. $myarray = array_values($emptyRemoved); $progress = 0; // where to start $max = count($myarray); // how many records to process until stop. // Tell Drupal about the batch process. $batch = array( 'operations' => array(), 'finished' => 'product_display_batch_finished', // runs after batch is finished 'title' => t('Deleting products'), 'init_message' => t('Beginning product delete'), 'progress_message' => t('Deleted @current out of @total'), 'error_message' => t('Product deletion failed.'), ); //...
hookup ur code with us