Welcome Guest, Not a member yet? Register   Sign In
stop current function and start next
#1

[eluser]luukskywalker[/eluser]
Hi everybody,

I'm having a lot of trouble with a small piece of code.

My problem is in the following code.

Code:
if (ereg("([0-9]{2})/([0-9]{2})/([0-9]{4})", $date1)) {          
Echo "its correct";            
}else{
$this->_function_b();
}

This piece of code is a part of a larger function and i want to call another function when my date is not valid, and stop this function.
This happens at $this->_function_b.
But my the rest of this functions (after this IF-ELSE) also executes.

But i want to stop this function and execute function b

Does anyone know where my problem is?


Messages In This Thread
stop current function and start next - by El Forum - 04-21-2008, 03:20 AM
stop current function and start next - by El Forum - 04-21-2008, 03:27 AM
stop current function and start next - by El Forum - 04-21-2008, 03:27 AM
stop current function and start next - by El Forum - 04-21-2008, 03:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB