作为 PHP 新手并查看了文档等,我无法找到这个问题的答案。
我想接受$_POST
如下输入:
Large Automated Structural Restoration 1 Hull Repair Unit Medium 50 m3
Experimental 10MN Microwarpdrive I 5 Propulsion Module Medium 50 m3
Warp Disruptor I 1 Warp Scrambler Medium 5 m3
Upgraded EM Ward Amplifier I 1 Shield Amplifier Medium 5 m3
Tracking Disruptor I 1 Tracking Disruptor Small Medium 5 m3
变成一个array
like:
[Experimental 10MN Microwarpdrive I] [5] [Propulsion Module] [] [Medium] [50] //Disregard m3
[Warp Disruptor I] [1] [Warp Scrambler] [] [Medium] [5]
...
[Tracking Disruptor I] [1] [Tracking Disruptor] [Small] [Medium] [5]
到我可以调用一个变量的地方,$asset[0][name]
这样我就可以准备一个对外部资源的 XML 调用。
逻辑正在逃避我,或者我不理解某些东西。请帮忙!