how to put html in a .module php file I have a input box created with html need to put in the specific block. I saw posts writing there to add the html by function but i cant do it since it is php file
Is it right way to do this? what is the exactly way to do this?
    function firstmodule_block_view($delta = ''){

$block = array();

switch ($delta) {   
    case 'signup':
    $block['subject'] = t('Newsletter signup');
    $block['content'] = myblock();
    break;
}       
    return $block;
}

function myblock(){
//html code goes here????
}
So first you want to define a block that contains a form. You define the contents of a block in $block['content'].

/**
 * Implements hook_block_info().
 */
function MYMODULE_block_info() {
  $blocks['your_block_name'] = array(
    'info' =&gt; t('Name of your block'), 
    'cache' =&gt; DRUPAL_NO_CACHE,
  );
  return $blocks;
}

/**
 * Implements hook_block_view().
 */
function MYMODULE_block_view($delta='')
{
  switch($delta) {
    case 'your_block_name':
      $block['subject'] = null;
      $block['content'] = drupal_get_form('MYMODULE_form');
      break;
  }
  return $block;
}


An after that you need to define your form. In Drupal you use the Form API to build forms. In the example above we fetch the form called MYMODULE_form. And the form is defined by implementing hook_form().

/**
 * Implements hook_form().
 */
function MYMODULE_form($form, &amp;$form_state) {
  $form['MYINPUTBOX'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('My label')
  );
  return $form;
}