I want to validate mobile number of 10 digits and also add a prefix of 0 when I enter into the database.
if(!ereg("^[7-9]{1}[0-9]{9}$", $mob)) { return false; }