Writing a code snippet should be easy, and self explanatory.
First, check if a code snippet that does what your does already exists. If it does, check to see if it's done in a similiar way. If it does, include your code snippet in that snippet's thread. If not, give your snippet a new thread. Also, try and post a link in the older thread about your snippet, and vice versa.
The code snippets should be named in a simple way, such as
Type: Name
So for example, a code snippet for Regular expressions for Postal codes should be named:
Regex: Postal Codes
Try to follow everyone else's lead, and using existing types if they are already being used.
Snippets should describe what they do, along with a simple sample.
Code Snippets will assumed to be for use in PHP. If the code snippet is NOT PHP, define it in the subject line.
CSS: Three Column Layout
SQL: Country Codes
How To: Adding New Code Snippets
Moderator: General Moderators