I'm using the function:
function findTeamFromID($teams,$ID) {
$results = array_column($teams, 'langform', 'id_teams');
return (isset($results[$ID])) ? $results[$ID] : FALSE;
};
Now i want not only to replace the ID with the name, it should write a link to the detail page. I don't wanted to touch the return line so i made this:
function findTeamFromID($teams,$ID) {
$results = array_column($teams, 'langform', 'id_teams');
return "<a href=\"details.php?id=".$ID."\">";
return (isset($results[$ID])) ? $results[$ID] : FALSE;
return "</a>";
};
Funny now is, that Return 1 and 3 appear and the href will be correctly created. But the second return doesn't appear anymore.
What did i make wrong?