【发布时间】:2014-03-27 12:32:05
【问题描述】:
我有一个 csv 文件
ID PARENT NAME
1 NULL Consumer Electronics
2 NULL Mobile Accessories
3 NULL Gaming
4 3 xbox
5 3 playstation
6 2 iPad & iPhone
7 1 Usb cables
8 1 Battery
我想要这个结果,用一个 php 脚本
ID NAME
4 Gaming | xbox
5 Gaming | playstation
6 Mobile Accessories | iPad & iPhone
7 Consumer Electronics | Usb cables
8 Consumer Electronics | Battery
我该怎么办?谢谢
【问题讨论】:
-
我试图表现出色,但我不知道如何在 php 中做到这一点