When building a drupal theme sometimes we need to display a block region in an unusual way.

For example, displaying drupal block region in search result page at the middle of the search result item.

One may say, how can we do that?

The answer is..

theme('block', 'block-region-name');

You will need to add the block region to your_theme.info file if it hasn't been added yet before invoking the above php snippet.

And after page refresh, voila. you got your self a block region placed in that page.

No need to modify template.php, just plain insert the code to the page / module that you wanted the custom block to appears.

Sometimes in custom module you need to return the value before the block is displayed on the output.