This question is regarding getopt function in php. I need to pass two parameter to the php scripts like
php script.php -f filename -t filetype
There is a problem in your approach. What if user gives following command line by mistake. the script will not be able to detect it and fail as $file['t'] will be an array.
$file['t']
php temp.php -f filename -t filetype -f filename2