![]() |
Syntax: checking if multiple variables are set
I want a bit of code to run if $HD is set, $VD is also set, and $TD is NOT set.
Is there an easy way to do this? I'm guessing it would be somthing like: PHP Code:
thanks, Nick |
More like ;
PHP Code:
|
Thanks :)
Is this valid code to set $C equal to $A squared plus $B squared? PHP Code:
|
Um, did you mean set $C to the Square Root of $A squared plus $B squared ;)
|
yeah, that was a typo...
I'm trying to calculate pythagreom therum. (sp?) |
Then yes, it looks valid.
|
Yep! Personally I would pow(X, 2) to square it, but that doesn't matter. I gave it a trial run with 3, 4, and 5:
PHP Code:
|
Thanks :)
Do you know if there's a command to check and see if any two variables out of a whole bunch of them isset? |
I highly doubt there is, but here is a quick one I wrote:
PHP Code:
|
Thanks.
Does this work: PHP Code:
|
All times are GMT. The time now is 06:04 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|