Advertisement
dimipan80

Personal Info

Dec 2nd, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. /* Write a PHP script PersonalInfo.php. Declare a few variables. The first variable should hold your first name,
  2. the second should hold your last name, the third - your age, and the last one should hold your full name (use
  3. concatenation). The result should be printed. */
  4.  
  5. <?php
  6. function getPersonalInfo($firstName, $lastName, $age) {
  7.     $fullName = $firstName . ' ' . $lastName;
  8.     echo "<p>My name is $fullName and I am $age years old.</p>\n";
  9. }
  10.  
  11. getPersonalInfo('Mister', 'DakMan', 21);
  12. getPersonalInfo('Pesho', 'Peshev', 55);
  13. getPersonalInfo('Bill', 'Gates', 59);
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement