Problems to add a form in a block I have a very small experience with Drupal but I have to add a little form in a block (for a newsletter) in a custom module.

I write this code for the moment :

function block_contact_default() {
  $content = array();
  $content[] = '&lt;div class="logo"&gt;My.&lt;span&gt;Site&lt;/span&gt;&lt;/div&gt;';
  $items[] = array('class' =&gt; 'mail', 'data' =&gt; l(t("By mail"), 'node/'.variable_get('webform_contact_default_nid', FALSE)));
  $chat = variable_get('default_chat', "");
  if(!empty($chat)){
    $items[] = array('class' =&gt; 'chat', 'data' =&gt; l(t("By chat"), variable_get('ot_default_chat', "")));
  }
  $facebook = variable_get('default_facebook', "");
  if(!empty($facebook)) {
      $items[] = array('class' =&gt; 'facebook', 'data' =&gt; l("Facebook", $facebook));
    }
    $twitter = variable_get('default_twitter', "");
  if(!empty($twitter)) {
    $items[] = array('class' =&gt; 'twitter', 'data' =&gt; l("Twitter", 'http://twitter.com/'. $twitter));
  }

    $link_newsletter = drupal_get_path_alias('node/'.variable_get('webform_newsletter_default_nid', ''), $language-&gt;language);
    if(strstr($path_newsletter, 'node/') !== FALSE){
        $link_newsletter = drupal_get_path_alias('node/'.variable_get('webform_newsletter_default_nid', ''), 'fr');
    }

    $form['#method'] = 'post';
    $form['newsletter_form'] = array(
      '#type' =&gt; 'fieldset',
      '#title' =&gt; t('Suscribe to Newsletter !'),
      '#tree' =&gt; TRUE
    );
    $form['newsletter_form']['newsletter_mail'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('E-mail'),
      '#default_value' =&gt; t('E-mail')
    );
    $form['submit'] = array('#type' =&gt; 'submit', '#value' =&gt; t('OK'));
    $items[] = array('class' =&gt; 'newsletter_form', 'data' =&gt; $form);

    $content[] = theme('item_list', $items);
    $content[] = $form;

    return array(
      'subject' =&gt; t("Contacts"),
      'content' =&gt; implode('', $content),
      'classes' =&gt; array('block-contact')
    );
}


I'm using Drupal 6.25
But when I go on my page I get only a string "Array", not really what I wanted... I'm sure I don't do this properly. Could you help me ? Thank you with advance.
More information would be more helpful to answering this question. I have no idea what file/function you have put this code into, if you have in your module any of the other hooks necessary to display a block or what your actual end-goal is here (are you printing a form in a block created by another module?). However, this code doesn't seem to correlate to any of the hooks necessary for creating a block within a module in Drupal 6.

You should take a look at the Examples for Developers module and its examples of a module that creates a block and a module that creates a form. By following those examples, you should be able to easily build a module that will create a form and a custom block that outputs that form.