I would like to store prone number in db which may have the following fields:
(555) 555-5555 Ext. 5555
Now, the form that I have splits the input into 4 distinct groups to make it clear to user what to put in. There are a number of way it could be stored properly. For example I can just combile the values into one var and tuck it away, like:
if ($group1 != '') {
$ext = " Ext. ".$group5;
} else {
$ext = '';
}
$number = "(".$group1.") " . $group2 . "-" . $group3 . $ext;
But it seems there may be a better way of doing it. Any suggestions?