floppydrivez Posted March 2, 2007 Share Posted March 2, 2007 I wanna use something like the following, but have had no luck with it. }elseif(date("m") <= 06 || $czdconf[strtolower(fquart)] <= $total_donated_fquart){ I know all variables can operate as pairs, but not together with OR. Any suggestions? Quote Link to comment Share on other sites More sharing options...
micah1701 Posted March 2, 2007 Share Posted March 2, 2007 should: [strtolower(fquart)] be: [strtolower($fquart)] or: [strtolower("fquart")] is fquart a $variable or a "string" ? Quote Link to comment Share on other sites More sharing options...
floppydrivez Posted March 2, 2007 Author Share Posted March 2, 2007 No its an array for the config table. All items work seperately and without the OR operator. This I have tested. Quote Link to comment Share on other sites More sharing options...
btherl Posted March 2, 2007 Share Posted March 2, 2007 There's nothing wrong there.. if it works without the or, it will work with the or. I suggest you double check that it works without the or. Try printing out the values of each variable just before you do the comparison. Also, you should use either 'fquart' (for a constant) or $fquart (for a variable). Quote Link to comment Share on other sites More sharing options...
floppydrivez Posted March 2, 2007 Author Share Posted March 2, 2007 Yeah I tried all that before, but again to be sure. I will just have to break it down into seperate if statements till I can come up with a fix or some money to pay you people to do it. Quote Link to comment Share on other sites More sharing options...
btherl Posted March 2, 2007 Share Posted March 2, 2007 Give us some more details and we can fix it. First, tell us what you want the statement to do Then give us a printout of all the variables involved (using var_dump() if possible), just before the if statement. Then we can tell you why it's not working. Quote Link to comment Share on other sites More sharing options...
floppydrivez Posted March 2, 2007 Author Share Posted March 2, 2007 Ok lets have a good laugh on floppy's behalf. It was my dumb date("m") I was doing it all wrong. Thanks for the help. I obviously need a breather. I will post the corrections in a few mins. 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.