programming languages tutorials |
Posted: 01 Jan 2013 07:54 AM PST PHP Functions The real power of PHP comes from its functions. In PHP - there are more than 700 built-in functions available. PHP Functions: In this tutorial we will show you how to create your own functions. For a reference and examples of the built-in functions. Creating PHP functions: • All functions start with the word "function()" • Name the function - It should be possible to understand what the function does by its name. The name can start with a letter or underscore (not a number) • Add a "{" - The function code starts after the opening curly brace • Insert the function code • Add a "}" - The function is finished by a closing curly brace Use a PHP Function Now we will use the function in a PHP script:
The output of the code above will be: Hello world! My name is Kai Jim Refsnes. That's right, Kai Jim Refsnes is my name. |
You are subscribed to email updates from Programming Languages Tutorials To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Post a Comment