如何在codeigniter中调用函数内部函数

I want to call the function inside function through the url but i am getting the blank page using this code.

Here is my php code

public function womens()
{
    function undergarments()
    {
        $this->headerplace();
        $this->menuplace();
        $id = '1';
        $query['result'] = $this->Products_model->showwomensubcat($id);
        $this->load->view('womens', $query);
        $this->footerplace();
    }
}

Here is Html:

<a href="<?php echo base_url().'products/womens/undergarments';?>">Garments</a>

Try something like this

public function women()
{
  $cat=$this->uri->segment(3);         // now send undergarments here
  $data['items']=$this->Products_model->getItemsByCat($cat);

  $this->load->view('header');
  $this->load->view('menu');
  $this->load->view('women',$data);
  $this->load->view('footer');
}

The way you were doing above in your post, how many function will you create in case you have hundreds of sub-categories. Make things dynamic. With the code above you can send any category. You can even enhance it by using routes or create fancy URLs by using routes but so far what you have asked. the above code is your solution. Just define the function in your model to get your data like

public function getItemsByCat($cat)
{
   return $this->db->select('*')->from('items')->WHERE('cat',$cat)->get()->result_array();
}

and then render your view

Edit

<a href="<?php echo base_url().'products/womens/undergarments';?>">Garments</a>

Above URL means, your controller name is products, your function name is womens and you are sending the parameter undergarments in url so when you click the link Garments you will be taken to women function of products controller which will fetch all records of undergarments category