我正在尝试将一些基本的、格式化的纯文本转换为 PHP 数组,这样我就可以进一步操作和显示数据。
下面是我正在使用的匿名数据集...
| |Customer |From |To |Bkg |Cabin |Class |Seat |Accept |
|1 |Palmer Lee Mr |JFK |LAX | |P |P |3K | |
|2 |Palmer Jamiee J Mrs |JFK |LAX |Y |P |P |3F |Boarded |
|3 |Coleman David Mr |JFK |LAX | |P |A |2F |Boarded |
|4 |Coleman Roberta Mrs |JFK |LAX |Y |P |A |2K | |
|5 |Williams Marina Lady |JFK |LAX | |P |F |1K | |
|6 |Graham Christine A Mrs |JFK |LAX | |P |P |4F | |
|7 |Graham Dean A Mr |JFK |LAX | |P |A |4A | |
|8 |Howell Fiona Ms |JFK |LAX | |P |A |5K | |
|9 |Cobb Hamish Mr |JFK |LAX | |P |A |1A | |
|10 |Brown Derek Mr |JFK |LAX | |P |P |2A |Accepted |
|11 |Brown Elizabeth Mrs |JFK |LAX | |P |P |3A |Accepted |
|12 |Reyes Ciaran Mrs |JFK |LAX | |P |F |5A |Standby |
|13 |Reyes Joseph Mr |JFK |LAX | |P |F |5F |Standby |
我曾尝试使用substr();,preg_replace();但没有运气。
有没有人有这样的数据处理经验?希望得到一些帮助!
撒科打诨
慕码人2483693