[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?