经过一天的尝试解决这个问题,我不得不认输。
需要将层次结构格式化为报告/csv,其中缩进/层次结构正确,我需要一个接受数组的php函数,并创建如下层次结构。我知道起始节点是“销售”;
//[so] [activity] [milestone] [compleated]
array(
array("Sales", "Motor", "Documentation", "10%"),
array("Sales", "Motor", "Communication", "15%"),
array("Sales", "Motor", "Metro file", "30%"),
array("Sales", "Motor", "Training", "33%"),
array("Sales", "Motor", "Client Services", "23%"),
array("Motor", "Documentation", "Doc revamp", "42%"),
array("Motor", "Documentation", "SLA", "33%"),
array("Motor", "Documentation", "KRA", "25%")
)
Sales
Motor
Documentation 10%
Doc revamp 43%
SLA 33%
KRA 25%
Communication 15%
Metro file 30%
Training 33%
Client Services 23%
Sales
xx Motor
xxx Documentation 10%
xxxx Doc revamp 43%
xxxxx SLA 33%
xxxxx KRA 25%
xxxx Communication 15%
xxxx Metro file 30%
xxxx Training 33%
xxxx Client Services 23%