107 funkce + formulář required

This commit is contained in:
kankys
2024-09-30 17:49:39 +02:00
parent 6f18eb5bfb
commit 06061f84dc
6 changed files with 60 additions and 15 deletions

View File

@ -0,0 +1,21 @@
<?php
/**
* Popis studenta
*
* @param string $first_name - křestní jméno studenta
* @param string $second_name - příjmení studenta
* @param int $age - věk studenta
*
* @return string popis studenta
*/
function studentDescription($first_name, $second_name, $age){
return "Toto je " . $first_name . " " . $second_name . ".
Věk studenta je " . $age . " let. <br>";
}
// Použití
echo studentDescription("Harry", "Potter", 15);
echo studentDescription("Ron", "Weasley", 14);
$student = studentDescription("Hermiona", "Grangerová", 15);
echo $student;