function custom_function()
{
if ($error == 0) {
return true;
} else {
return Error!;
}
}
if (custom_function() != Error!) {
echo Success;
} else {
echo Error;
}
Also, you could still return false on your custom_function(), if before
the return you
I think this is more along the lines of what was wanted :)
function custom_function()
{
if( $problem1 )
{
return 'Problem 1 occured!';
}
elseif( $problem2 )
{
return 'Problem 2 occured!';
}
elseif( ... )
{
...
}
return true;
}
if(
On Thursday, April 18, 2002, at 11:38 AM, Julio Nobrega Trabalhando
wrote:
function custom_function()
{
if ($error == 0) {
return true;
} else {
return Error!;
}
}
if (custom_function() != Error!) {
echo Success;
} else {
echo Error;
}
Your
3 matches
Mail list logo