Page 1 of 1

how to build the function - PLEASE HELP ME

Posted: Sat Aug 08, 2009 7:55 am
by azri_bech
i'm new php programmer
Query result - the query result displayed the code for by_channel
for example: No. by_channel
---- -----------
1. S
2. E
3. W

how to build the function to make by_channel is display more meaningful like this:
No. by_channel
---- -----------
1. SMS
2. EMAIL
3. WEBSITE

please help to solve my problem,thank you

Re: how to build the function - PLEASE HELP ME

Posted: Sat Aug 08, 2009 8:22 am
by frao_0
Personnally, i did not understand nothing at all

Re: how to build the function - PLEASE HELP ME

Posted: Sat Aug 08, 2009 1:13 pm
by Mark Baker

Code: Select all

 
function displayByChannel($byChannel) {
   switch ($byChannel) {
      case 'E' : $returnValue = 'EMAIL';
                 break;
      case 'S' : $returnValue = 'SMS';
                 break;
      case 'W' : $returnValue = 'WEBSITE';
                 break;
   }
   return $returnValue;
}
 

Re: how to build the function - PLEASE HELP ME

Posted: Sun Aug 09, 2009 4:37 am
by azri_bech
Thank you so much :)