PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am having problems understanding return true and return false. If a value is returned false then how to code it to tell what to do next? what exactly is the difference of the return true and false?
after then code returned false, what do i do next to get the returned value? can i have a small tutor on how to get the value of a return false or return true? or what is the difference when i use them like that.
Last edited by stevestark5000 on Sun Mar 13, 2011 10:37 pm, edited 2 times in total.
$val = mySum(2,3); // store return value into a variable
print(mySum(2,3)); // use return value as an argument for another function
if (mySum(2,3)) { // make a decision based on the return value
//...
} else {
//...
}