I'm bad at explaing, so I shall try my best...
Each $company has its own method of email for cellphones. Company A's method might be 1234567890@companya.com Company B's method might be 1234567890@cell.comapnyb.com
What I was attempting to accomplish was letting users select their company, in an easy to read format:Cingular, Verizon, T-Mobile etc...
Since almost every company uses the 10 digit phone number before the @companya.com, I was wondering if, when the message is sent, could I fill in behind the $phone, the correct @compay.com based in the Company name?
It takes me hours to write something simple, so this will be a very poor example...
I was thinking about defining the Company and the email ending.
Cingular = @cingular.com
Verizon = @.com
etc.
Then, adding the correct email ending to the $phone
if $company = Cingular, then "@cingular.com"
elseif $company = Verison, then "@verison.com"
else $company = other, then "Provider unknown"
I know the context is completely wrong, but it's about the best I can do, unless I spend 2 hours putting together the actual statements and code. I was more concerned about the concept and if putting the "if" behind the phone was the correct thing to do.