you have sent me this code:
<?php
$category = new Mage_Catalog_Model_Category ();
$category->load ( $catid );
$prodCollection = $category->getProductCollection ();
$productIds = array ();
foreach ( $prodCollection as $product ) {
$productIds [] = $product->getId (); // Array to store all the product ids
echo "<pre>";print_r($productIds);die;
}
?>