Difference between revisions of "Function Template"
From Whirlwind eCommerce Wiki
(New page: == Description == Function() performs a function that does stuff == Syntax == $returnValue = Function(type $attrib1, type $attrib2 [,type $optionalAttrib3]); == Paramaters == *attrib1 ::...) |
m (Reverted edits by Ukaqicuryx (Talk) to last version by 71.163.185.8) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 14: | Line 14: | ||
== Return Values == | == Return Values == | ||
| − | Return var type or false under conditions. | + | Return var type or false under conditions. Example returned object structure: |
| + | |||
| + | <pre> | ||
| + | Array | ||
| + | ( | ||
| + | [0] => Array | ||
| + | ( | ||
| + | // elements group 1 | ||
| + | [element1] => INT | ||
| + | [element2] => STRING // this is element 2 notes | ||
| + | // elements group 2 | ||
| + | [element3] => STRING // this is element 3 notes | ||
| + | ) | ||
| + | [1] => Array ... | ||
| + | ) | ||
| + | </pre> | ||
| + | |||
| + | Defining the returned object: | ||
| + | |||
| + | Elements from the child page associative array are as follows: | ||
| + | {|border=2 | ||
| + | |- | ||
| + | |Element | ||
| + | |Description | ||
| + | |Example | ||
| + | |- | ||
| + | |<b>Title for this section of elements</b> | ||
| + | |- | ||
| + | |element1 | ||
| + | |INT - description of element 1 | ||
| + | |6 | ||
| + | |- | ||
| + | |element2 | ||
| + | |STRING - description of element 2 | ||
| + | |XYZ | ||
| + | |- | ||
| + | |<b>Title for another section of elements</b> | ||
| + | |- | ||
| + | |element3 | ||
| + | |INT - description of element 3 | ||
| + | |2 | ||
| + | |} | ||
== Examples == | == Examples == | ||
;example 1 | ;example 1 | ||
| − | example 1 | + | <source lang="php"> |
| + | // example code 1 | ||
| + | </source> | ||
;example 2 | ;example 2 | ||
| − | example 2 | + | <source lang="php"> |
| + | // example code 2 | ||
| + | </source> | ||
== See Also == | == See Also == | ||
Latest revision as of 16:52, 1 December 2010
Description
Function() performs a function that does stuff
Syntax
$returnValue = Function(type $attrib1, type $attrib2 [,type $optionalAttrib3]);
Paramaters
- attrib1
- description of attribute 1
- attrib 2
- description of attribute 2
- attrib 3
- description of attribute 3
Return Values
Return var type or false under conditions. Example returned object structure:
Array
(
[0] => Array
(
// elements group 1
[element1] => INT
[element2] => STRING // this is element 2 notes
// elements group 2
[element3] => STRING // this is element 3 notes
)
[1] => Array ...
)
Defining the returned object:
Elements from the child page associative array are as follows:
| Element | Description | Example |
| Title for this section of elements | ||
| element1 | INT - description of element 1 | 6 |
| element2 | STRING - description of element 2 | XYZ |
| Title for another section of elements | ||
| element3 | INT - description of element 3 | 2 |
Examples
- example 1
// example code 1- example 2
// example code 2