We are thrilled to inform you that Lancecourse is NOW INIT Academy — this aligns our name with our next goals — Read more.

It seems like you are using an ad blocker. To enhance your experience and support our website, please consider:

  1. Signing in to disable ads on our site.
  2. Sign up if you don't have an account yet.
  3. Or, disable your ad blocker by doing this:
    • Click on the ad blocker icon in your browser's toolbar.
    • Select "Pause on this site" or a similar option for INITAcademy.org.

Understand and use functions in PHP

By zooboole 9 years ago
To this question they are many answers all pointing out the same concept and idea. Here are some: > Functions are "self contained" modules of code that accomplish a specific task. Functions usually "take in" data, process it, and "return" a result. Once a function is written, it can be used over and over and over again. Functions can be "called" from the inside of other functions. Source: http://www.cs.utah.edu/~germain/PPS/Topics/functions.html > A function is a piece of code which takes one more input in the form of parameter and does some processing and returns a value. Source: http://www.tutorialspoint.com/php/php_functions.html But practically what does that mean if your are beginner or you have never been in touch with functions? To help you undertsand that let me take a real example of a **bird**. You know creating softwares/applications is similar to creating these beings. So imagine you have to create that bird, you will start by making it bones, flesh and parts, feathers, etc. upon that you will have the possibility for it to *sing*, *walk*, *fly*, *jump*, etc. This actions are the bird's functions(*walk*, *jump*, *fly*, *sing*).

5 Comments

Sign in to reply

zooboole
zooboole
11 days ago Reply
Great article. Thanks
zooboole
zooboole
11 days ago Reply
This is a nested reply
zooboole
zooboole
11 days ago Reply
Is this also good
zooboole
zooboole
11 days ago Reply
saf sdf sd fsdf sd
zooboole
zooboole
11 days ago Reply
you too