How can I create a function in PHP? Is it like a variable?
How To Create A Function In PHP? was last modified: November 9th, 2018 by
1 Answers
You can create a php function like this.
<?php function foo(){ echo 'This is a function'; };?>
Then you would call it into your application like this.
<?php foo(); ?>
We cover it more in our PHP7 Functions Tutorial here.
Answer for How To Create A Function In PHP? was last modified: March 19th, 2023 by