ok...since the purpose of this question is not exposed, the way i see it....u wanted 1function to serve the purpose all the 3 functions you mentioned top???
and if so...its simple...!
PHP Code:
function userdetails($user,$item)
{
if($user == null)
return "<del>deleted</del>";
else
{
switch($item)
{
case '1':
return "<a href=/user/".strtolower($user).">$user</a>";
break;
case '2':
return $username;
break;
default:
return $user;
break;
};
}
}
$item holds the number for the cases.....so using one function with 2 parameters you can output any detail you want...and easy to add more details for accessing, just introduce another case to the switch loop...tc
HOPE I HAVE HELPED YOU!!