Get programs
From TMM Wiki
Jump to navigationJump to searchget_programs
Retrieve programs available for a specified login
- array get_programs(integer loginid[[[, bool loop=FALSE], bool detailed=FALSE], bool hidden=FALSE])
Retrieves an array of all programs the member with this loginid can access. The loop parameter determines how the array is built; the detailed parameter determines how much info about each program to include; the hidden parameter determines if hidden programs are added or not.
Output
If loop is FALSE, get_programs returns an array in the following form.
{ programid => "Program Name [Payout]" ... }
If loop is TRUE but detailed is FALSE, get_programs returns an array in the following form.
{ 0 => { 'id' => programid, 'name' => "Program Name [Payout]" } ... }
If loop is TRUE and detailed is TRUE, get_programs returns an array in the following form.
{ 0 => { 'id' => programid, 'name' => "Program Name [Payout]", ... all other fields from programs table ... } ... }