Select List Snippets


Iterate enumerative and associate array using for loop in php.

This function builds an HTML select list from from data retrieved from a mySQL table.

30 August, 2015   

Loads the contents of a dir an sorts them by the date of creation.

20 October, 2012   

Create dynamic variables from a query or a list.

17 December, 2011   

In a table, some of the columns may contain duplicate values. Sometimes you will need to list only the different (distinct) values in a table. The DISTINCT keyword can be used to return only distinct (different) values.

By default Symfony displays forms in tables, with each new input being a table row. If you want to display your forms more semantically with fieldsets and lists, Symfony has a list formatter built in. You can tell an individual form to display as a list using the code below.

21 April, 2012   

Retrieves a list of "on call" incidents for the most recent time period. Selects all Support Analysts.

This function will not recurs subdirectories - it will only return a list of sub folder on the "first" level.

When developing applications that need to operate on files and directories it is a common task to, for example, get the list of all sub-directories for a given directory.

Example code for merge sort of an integer list

This is an example for Form Based Query

21 December, 2013   

Great page for testing the style guide for a website.

An example of a simple double linked list using OOP techniques

To produce a random character from a specific list of characters (for example 'x', 'y' or 'z')

27 August, 2012   

HTML code for Standard List Navigation

A bug seems to occur when you add a negative margin to a list item in IE6. The background image applied to the list item gets repeated randomly and generally messes up. Add this little gem to your head to fix the problem. Remember to change the id tag to your own.

Java code example to list the Files or Subdirectories in a Directory

Delphi code to display the screen size and the list of fonts

MySQL code example showing how to SELECT within a SELECT (a subselect).

PHP code to convert MySQL date to UNIX timestamp