selectMember -- Provide option tags for a select input.


string selectMember ($selected = 0, $none = 'yes', $fleet = '', $special_chars = '', $active='false')

This function will return <option> tags with values as the member id, and text as the member name. It will also pre-select the member with id if the first parameter is given.

If $none is given as "yes", an option with value 0 and string "None" will be the first option returned.

If $fleet is given as an integer, only the members in that fleet will be returned.

If $special_chars is given as "de-quote", slashes will be added to any quotes appearing in the names of members. This is useful for javascript applications.

if $active set to "true", it will return a list of all members who have status 0 or "active". It will NOT return any reserve, LOA, or honorary members. To get those, leave this unset or set it to "false"


selectMember () /* Returns options for all members in the RS, including the "None" option */

selectMember (1, "no", 1) /* returns all the members in fleet with id 1. No "None" option is returned. If member with id 1 is in the list, he will be selected by default. */

Related Functions

squadMemberSelect, absArray, selectSquad



Function Index