How to parse this kind of string using php?
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,9947321572How can I parse this kind of data?
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);
精彩评论