PrMa Posted February 13, 2008 Share Posted February 13, 2008 Say I have 3 functions. How is the best way to code that? I have it like this now (example): If (function 1) { execute} If (function 2) { execute} else { execute} The problem is that only the else triggers. Clearly this method is wrong, so the question is; How should i code to make it work? Quote Link to comment Share on other sites More sharing options...
revraz Posted February 13, 2008 Share Posted February 13, 2008 What logic dictates which function you want to use? Quote Link to comment Share on other sites More sharing options...
phpSensei Posted February 13, 2008 Share Posted February 13, 2008 Does the functions return a BOLEAN, STRING, or NUMBER? Quote Link to comment Share on other sites More sharing options...
PrMa Posted February 13, 2008 Author Share Posted February 13, 2008 Nevermind, solved it myself, thanks anyway Just didn't use the else, instead one more digit to specify the third function, and leave the else out. And for the second qusetion, it returns a string from a database, in boolean mode. It's for a search function. Quote Link to comment Share on other sites More sharing options...
aebstract Posted February 13, 2008 Share Posted February 13, 2008 None of what you said could have been answered in any way. You didn't tell us what you were trying to do. Quote Link to comment Share on other sites More sharing options...
revraz Posted February 13, 2008 Share Posted February 13, 2008 And adding a 3rd option to two that don't work wouldn't solve it either, but glad you got it to work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.