| Ajax Tutorials, PHP Tutorials, Javascript Tutorials, Visual Basic.Net Training, XHTML tutorials, php script library, PHP Codes, Programming tutorials, web development tutorials | |||||||||
![]() |
|||||||||
| Home | Forums | Downloads | Books | Submit Content | Links | |||||||||
Function in PHPDate:2006-03-19A function is a set of code that can optionally accept parameters and return a value. A PHP function may take zero or more parameters. A function has three major parts:
Every function is stated with function keyword. The syntax of PHP function is as follows:
The parameters of function are optional. you can use function without paramters. For example:
Output:
Another example of PHP with argument is:
In this examples you have used one argument $website.
See another function:
This function valueExpressions has three arguments $value1, $value2, $symbol. The user will call this function as follows:
See this called function, you understand, 70 is this value against $value1 argument, Note: A function is a block of code that is not immediately executed but can be called by your scripts when needed. |
|
||||||||
| Desclaimer | Privacy Policy | Submit Content | Links | Link to Us | Sitemap |Contact Us | |||||||||
| Copyright Programming Tutorials, Web Development
Tutorials, Source codes © All Rights are Reserved. Powered By Evernew Solutions Personal Loan - Loans - Phoenix Landscaping - Credit Card Consolidation |
|||||||||