l103/7.1.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$nr = 100033474;
$naam = "Michaëlla Krajicek";
$link = playerlink($nr); //functieaanroep: $link krijgt de waarde de 'gereturnd' wordt
echo "Klik hier voor de gegevens van <a href='$link'>$naam</a>";
function playerlink($id){
if ($id >= 1000000){
return "http://www.itftennis.com/juniors/players/player.asp?player=$id";
}
else{
return "http://www.juniortennis.com/ajt/playerinfo.php?player_id=$id";
}
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse