Reputation: 18790
Now I am trying to import contact details from a csv file. In csv file phone number or mobile number are added like this format
Eg :- 9947321570/9947321571/9947321572
OR
9947321570;9947321571;9947321572
OR
9947321570,9947321571,9947321572
How can I parse this kind of data?
Upvotes: 0
Views: 62
Reputation: 47311
you are not using same set of delimiter, how to expect it will work???
spent some effort to make the csv to use same set of delimiter,
example, to use str_replace
to replace the uncommon delimiter to ,
str_replace(array(';','/'), ',', $field_for_phone_number);
Upvotes: 1