how to change h2 tag for div in block_view I've created a block like this 

function mymodule_block_view($delta = '') {
    if($delta == 'myblock') {
        $block['subject'] = 'mytitle';
        $block['content'] = myfunction();
    }
    return $block;
}


but the output is like this:

&lt;h2 class="block-title"&gt;mytitle&lt;/h2&gt;


I need change h2 to div

&lt;div class="block-title"&gt;mytitle&lt;/div&gt;


I've tried with _preprocess_block hook but i cant change that tag

could you please help me?
try with the following:


Implement hook_theme_registry_alter to take the templates from your module.




/**
 *  Implements hook_theme_registry_alter().
 */
function mymodule_theme_registry_alter(&$theme_registry) {
  // Defined path to the current module.
  $module_path = drupal_get_path('module', 'mymodule') . "/templates";
  // Find all .tpl.php files in this module's folder recursively.
  $template_file_objects = drupal_find_theme_templates($theme_registry, '.tpl.php', $module_path);
  // Iterate through all found template file objects.
  //test if this page isn't in BO page
  if (!path_is_admin(current_path())) {
    foreach ($template_file_objects as $key => $template_file_object) {
      // If the template has not already been overridden by a theme.
      if (!isset($theme_registry[$key]['theme path']) || !preg_match('#/themes/#', $theme_registry[$key]['theme path'])) {
        // Alter the theme path and template elements.
        $theme_registry[$key]['theme path'] = $module_path;
        $theme_registry[$key] = array_merge($theme_registry[$key], $template_file_object);
        $theme_registry[$key]['type'] = 'module';
      }
    }
  }
}




Copy modules/block/block.tpl.php and past it in templates folder of your module.
Rename it from block.tpl.php to block--mymodule--myblock.tpl.php to change only for your block.
Change the line from &lt;h2&lt;?php print $title_attributes; ?&gt;&gt;&lt;?php print $block-&gt;subject ?&gt;&lt;/h2&gt; to &lt;div&lt;?php print $title_attributes; ?&gt;&gt;&lt;?php print $block-&gt;subject ?&gt;&lt;/div&gt;
Clear cache.