Defining and Calling Functions in PHP


Create reusable code blocks with functions to perform specific tasks.

Source Code

function greet($name) {
    return "Hello, " . $name . "!";
}
echo greet("John");
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments