CBG Posted April 7, 2010 Share Posted April 7, 2010 Hi, I have a function with the below code in it and I want to have multiple Return values and am unsure how to do it if ( $one == 'yes') { echo 'One Appear'; } else { echo 'One Does not Appear<br>'; $one_bot = 0; } if ( $two == 'yes') { echo 'Two Appear'; } else { echo 'Two Does not Appear<br>'; $two_bot = 0; } if ( $three == 'yes') { echo 'Three Appear'; } else { echo 'Three Does not Appear<br>'; $three_bot = 0; } Now if I put the below it returns 1 0 (zero) in the browser and not all 3 return $one_bot; return $two_bot; return $three_bot; So it seems to be it not working like that, so should I put it in an array like $list = array($one_bot, $two_bot, $three_bot); return $list; ? If not how should I do it? Quote Link to comment Share on other sites More sharing options...
taquitosensei Posted April 7, 2010 Share Posted April 7, 2010 an array would be just fine. 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.