ptb_listUnique

Finds all unique values in given field.

Syntax

$var = ptb_listUnique($database, $fieldname);

Syntax description

$database
variable containing connected database
$fieldname
name of the field, for which unique values should be found

Return

This function returns array or null if database is empty.

Sample(s)

  $authors = ptb_listUnique($myDatabase, 'author');

If you need to use this function, it's a sign you should think about changing structure of your database :-)