$employee_id='E81OYKC'; // here is my employee id
getFileName($employee_id); // here i am calling function
echo $response; // here i want $response value.
function getFileName($employee_id)
{
//Mysql Query to fetch data
$sql = mysql_query("SELECT work_experience, curr_designation from employee_registration where employee_id='$employee_id'") or die(mysql_error());
//fetching data from server
while ($row = mysql_fetch_array($sql, MYSQL_ASSOC))
{
$curr_des = $row['curr_designation'];
$work_exp = $row['work_experience'];
$response = $work_exp.' '.$curr_des;
return $response; // here is my result
}
}
//here in this code i want $response value after calling method i.e getFileName() but i am getting blank value over there.