<?php
function greet($name) {
return "Hello, $name!";
}
echo greet("Saim");
?>
Explanation:
- Functions are created with
function
. - You can pass parameters (
$name
). - Output:
Hello, Saim!
<?php
function greet($name) {
return "Hello, $name!";
}
echo greet("Saim");
?>
Explanation:
function
.$name
).Hello, Saim!
Leave a Reply