This shows you the differences between two versions of the page.
|
conventions [2009/12/04 15:16] andre |
conventions [2009/12/04 15:17] (current) andre |
||
|---|---|---|---|
| Line 89: | Line 89: | ||
| Control structures should be commented before and in cases where the end of a control structure goes beyond the screen it should be commented to indicate the end of a control structure. | Control structures should be commented before and in cases where the end of a control structure goes beyond the screen it should be commented to indicate the end of a control structure. | ||
| + | ==== IF ==== | ||
| + | |||
| //Single if statements without an else event can be coded as such | //Single if statements without an else event can be coded as such | ||
| if ($_REQUEST["aname"] == "") $_REQUEST["aname"] = "Test"; | if ($_REQUEST["aname"] == "") $_REQUEST["aname"] = "Test"; | ||
| Line 103: | Line 105: | ||
| } | } | ||
| //End of the more complex if statement | //End of the more complex if statement | ||
| + | |||
| + | ==== FOREACH ==== | ||
| //For each statement | //For each statement | ||