Is there a way I can check if a function is true inside another function?
For example.
function Name() {
//check database
}
function Send() {
if(Name() == TRUE){
//do something
}
}
Is there a way I can check if a function is true inside another function?
For example.
function Name() {
//check database
}
function Send() {
if(Name() == TRUE){
//do something
}
}
Sure: just make sure the function returns TRUE:
function Name() {
echo 'Some Name';
return TRUE;
}
function Send() {
if (Name() == TRUE) {
// Do something
}
}