Alright, here's the deal.
First off, sorry for such a crappy first post. Second off, if this has been asked - sorry for not searching through the forums, but it's a fairly odd question.
Lets say I have an if statement with some ors. Is something like this possible (warning, pseudocode)
if ($x or $y or $z) {
blah($the_one_that_was_true);
}
Basically, I've written an app to control the playlist of music playing at my house. It's got play pause and start buttons. I need to execute the same external command with different arguments (the value of their associated POSTs), and do a refresh afterwards.
Currently this is implemented with three different ifs, practically the same code.
I'm wondering if the variable that "sets off" an if statement is discernable. Mainly to make my code slightly more elegant (lame, I know.). I could solve this by adding ifs to check the vars under the if - which would be fine (but not preferable) if I was doing something more complex.
Not to mention that this functionality would be really handy in a lot of applications. . . (the only language I can think of a way to do this in off the top of my head is perl).
So, any help out there?