phplist Coding Style Guidelines
Please use the following guidelines when developing code for phplist.
PHP Code
- Use long-format code escaping:
<?php. . .?>(manual page: http://www.php.net/manual/en/language.basic-syntax.php)
- Use echo to output all data, and don't forget the semi-colon:
- Add newlines (\n) after output lines, to help debug the output.
- When embedding variables in
- Make sure you properly quote array keys, i.e.
$array['key']and NOT
HTML Code
- Aim for XHTML Strict output.
- All tags and attributes in lower-case.
- Put all attribute values in double-quotes.
- Close all tags, including stand-along tags like
<br />
- Use CSS positioning except for tabular data.
- Web browser compatibility:
- Verify all output using the W3 validator: http://validator.w3.org/
- Start testing with a Gecko-based browser (Mozilla, Firefox, K-Meleon, etc) then verify with IE, Opera, Safari, etc.
- Forms:
- Include both the 'name' and 'id' attributes on all form fields.
- Include accessibility features:
- tabindex.
- label.
CategoryDevelopment



