我正在为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的工作日,一般来说,如何编写多维数组名称的选择器。是否有任何编写名称选择器的好教程?有什么想法吗?
答案 0 :(得分:2)