开发者

How to parse this kind of string using php?

开发者 https://www.devze.com 2023-02-11 01:14 出处:网络
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

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?


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消