我正在尝试从动态创建的 jquery 表单中解析 JSON 数据。用户可以单击“添加步骤”按钮添加任意数量(或少量)的表单字段(包括附加媒体链接),但我不知道如何在 PHP 中处理此类数据。这是我期望收到的一些示例表单 $_POST 数据:
Array
(
[1] => Array //1, 2, 3, 4 are the position for this particular 'step' on the page
(
[Counter] => 1
[Title] => step one
[Step] => description
[Links] => Array
(
[0] => link 1
[1] => link 2
)
)
[2] => Array
(
[Counter] => 2
[Title] => step two
[Step] => some kind of description
[Links] => Array
(
[0] => link 2
)
)
[3] => Array
(
[Counter] => 3
[Title] => step three
[Step] => description (another one)
)
[4] => Array
(
[Counter] => 4
[Title] => Step four
[Step] => a lame description
[Links] => Array
(
[0] => link 1
[1] => link 2
)
)
[tutorial_name] => tutorial name? jesus?
[tutorial_description] => some useless description
[tutorial_toolsused] => waste of a tools used
[tutorial_keywords] => waste of keywords
)
知道如何最好地处理此类数据(正则表达式,foreach)吗?我应该避免使用 post 协议吗?
任何帮助将不胜感激!