07-16-2008, 02:24 PM
|
#4 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: Maine, USA
Posts: 92
Thanks: 2
|
Quote:
Originally Posted by drewbee
I have never tried this before, but you can do a quick test to see.
PHP Code:
function funcOne()
{
echo "Function 1";
return true;
}
function funcTwo()
{
echo "Function 2";
return true;
}
if (funcOne() && funcTwo())
{
}
See what that does for you.
|
This runs funcOne then funcTwo correctly.
Quote:
Originally Posted by delayedinsanity
When it comes to conditional statements, you should always use order of precedence - if the first criteria in an AND or && operation is not met, it will not procede to the second.
-m
|
So it does follow an order of precedence... Good. Thanks folks!
The code just looks a little better to me as I do not have to nest layers and layers of if's. The thing with this section is that it needs to go in this order as the code calling the ftp wrapper class I wrote changes to the correct directory and then deletes a file. I wanted to make sure that the directory change always happens first as the delete will fail if it does not.
Thanks again! 
__________________
-- Bill
"Why is it drug addicts and computer aficionados are both called users?" -Clifford Stoll
|
|
|
|