larger smaller normal text version of this page
phplist Development

phplist Coding Style Guidelines

Please use the following guidelines when developing code for phplist.

PHP Code

  • Use long-format code escaping:
    <?php. . .?>
    (manual page:
  • Use echo to output all data, and don't forget the semi-colon:
    <?php echo $mydata; ?>
  • Add newlines (\n) after output lines, to help debug the output.
  • When embedding variables in
  • Make sure you properly quote array keys, i.e.
    and NOT
This latter syntax is improper code according to the manual (see "Array Do's and Don'ts") and has been broken with at least one PHP release (during 2003).


  • 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:
    • 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.

Page was generated in 0.0980 seconds