I’m new to php n’ doing some form verification stuff. So I came across this preg function and used it. But it issues "Function ereg() is deprecated " error. and in PHP manual it says that we can use preg() instead of ereg(). But I don’t understand what is says and it seems really difficult. please help me to solve this. this is a part of my code which use ereg().
[php]
if (ereg(’^[A-Z][- a-zA-Z]+$’,$var)) {
$valid = true;
}
[/php]
Please kindly help me