Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Write a PHP script PersonalInfo.php. Declare a few variables. The first variable should hold your first name,
- the second should hold your last name, the third - your age, and the last one should hold your full name (use
- concatenation). The result should be printed. */
- <?php
- function getPersonalInfo($firstName, $lastName, $age) {
- $fullName = $firstName . ' ' . $lastName;
- echo "<p>My name is $fullName and I am $age years old.</p>\n";
- }
- getPersonalInfo('Mister', 'DakMan', 21);
- getPersonalInfo('Pesho', 'Peshev', 55);
- getPersonalInfo('Bill', 'Gates', 59);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement