List names of all fields in the $database or tells if a $fieldname exists in it.
This function used with one argument returns array or null if database is empty; used with two arguments returns true if the $fieldname exists or null (=false) otherwise.
if (ptb_fieldnames($myDatabase, 'author')) { // if field 'author' exists in $myDatabase, proceed ...