Top

jumptojump2001 on "auto show array entry?"

February 19, 2010 by  

<?php $cateArray = null;?>
	<?php while (have_posts()) : the_post(); ?>
		<?php
			if (in_category('news')) {
				$n = new NewsContent(the_title_attribute(), the_permalink());
				array_push($cateArray, $n);
				}
			?>
		<?php endwhile;?>

This is my code
after i run this, it will auto print the entry of $cateArray, but i don’t want that. can any one tell what happen?

Share

Comments

Facebook comments:

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





*
Bottom