Functions Example

<?php
function greet($name) {
return "Hello, $name!";
} echo greet("Saim"); ?>

Explanation:

  • Functions are created with function.
  • You can pass parameters ($name).
  • Output: Hello, Saim!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *