Question: I want to show products in same category withing single product page. 
see bellow diagram what i want to achieve
[![live site example](https://i.stack.imgur.com/EJCJ2.jpg)](https://i.stack.imgur.com/EJCJ2.jpg) 
please see this site [<https://www.jackthreads.com/goodale/shirts/rutledge-navywhite-plaid-shirt/products/170189][1]> for more idea. i want to know how it achieve?

Answer: 
you can achieve this with below code..

```
    <?php $cats = $_product->getCategoryIds(); 
foreach ($cats as $category_id) {
    $category_id; exit;
   $products = Mage::getModel('catalog/category')->load($category_id)
 ->getProductCollection()
; //sets the order by price
} 

var_dump($products);?>

```
The Magento way of doing this is to add related product for individual Product from admin Panel

`Catalog > Manage Products > Choose the Product to Edit > select the related Product tab > and choose the relevent Product(s) you want to show on Product Page`

I now it is time consuming Process but you can show more relevant products and increase the sales.