我正在为 WordPress 构建一个插件,并且我有一个需要操作多维数组名称数据的屏幕。更具体地说,我有如下输入元素:
<div class="settingsContainer">
<input type="button" class="edit" value="Edit" />
<input type="hidden" name="initialFare[1][title]" value="Initial fare">
<input type="hidden" name="initialFare[1][rate]" value="2.25">
<input type="hidden" name="initialFare[1][description]" value="">
<input type="hidden" name="initialFare[1][whenType]" value="always">
</div>
<div class="settingsContainer">
<input type="button" class="edit" value="Edit" />
<input type="hidden" name="initialFare[2][title]" value="Initial fare II">
<input type="hidden" name="initialFare[2][rate]" value="2.25">
<input type="hidden" name="initialFare[2][description]" value="Hello">
<input type="hidden" name="initialFare[2][weekday][]" value="Mo">
<input type="hidden" name="initialFare[2][weekday][]" value="We">
<input type="hidden" name="initialFare[2][weekday][]" value="Th">
<input type="hidden" name="initialFare[2][startHour]" value="00:02">
<input type="hidden" name="initialFare[2][endHour]" value="23:56">
<input type="hidden" name="initialFare[2][whenType]" value="dayshours">
</div>
现在,问题是,如何迭代第二个 settingsContainer 的工作日,一般来说,我如何为多维数组名称编写选择器。有没有编写名称选择器的好教程?任何的想法 ?