The given PHP example is for getting a specific number of posts from a specific category, it is useful for news listing in sidebar. Code Example:
<ul> <?php global $post; $myposts = get_posts('numberposts=6&category=3'); foreach($myposts as $post) : setup_postdata($post); ?> <li> <div class="news_ticker_articles"> <p><strong> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"> <?php the_title(); ?> </a> </strong></p> <p class="excerpt_bottom"><? echo bm_better_excerpt(100, '...'); ?></p> </div> </li> <?php endforeach; ?> </ul>