Variable inside get_filenames function using CodeIgniter and PHP -


with following code trying file name inside my_pic folder , print not possible.

$this->load->helper('file'); $uid = 10;   $files = get_filenames('./maindirectory/<? echo $uid; ?>/my_pic'); print_r($files); 

the way filename following:

$this->load->helper('file');     $files = get_filenames('./maindirectory/10/my_pic'); print_r($files); 

does other way can use variable $uid?

what want here concat string variable :

$uid = 10; $files = get_filenames('./maindirectory/' . $uid . '/my_pic'); 

hope ;)