I have a file there is data, I add it to the database by criteria, there are 4 criteria
I add them to the database according to the criteria in CONTACT_TYPE I normalize by numbers, for example, if only numbers then = 3
if you have @ = 4, etc.
Please help with this question, if the digit is less than two digits then the criterion = 2 For example, if the digit is 1 or 12 in the file then the criterion = 2
if(isset($lstContact[0])) { for ($i=0;$i<=count($lstContact)-1;$i++) { $contacttype="0"; if(substr($lstContact[$i],0,1)=='+') $contacttype=2; if(strpos($lstContact[$i],'@')){ $contacttype=4; if ($CONTACTSmail=='') $CONTACTSmail= $lstContact[$i]; } if((strpos($lstContact[$i],'+')===false) && (strpos($lstContact[$i],'@')===false) && ($i!=0)) $contacttype=3; if($i==0) $contacttype=1 } }