selectMember
(/rs/public/functions.php)
selectMember -- Provide option tags for a select input.
Description
string selectMember
($selected = 0, $none = 'yes', $fleet = '', $special_chars = '')
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.
Examples
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
Dependencies
None.
Function Index
|