企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# array 数组(键值对) ## array 数组(键值对) ![](https://img.kancloud.cn/c5/e1/c5e16b0bd8200905eb144337e83c83dd_711x535.png) 生成效果 ![](https://img.kancloud.cn/7c/9b/7c9b63b755ab6d668523086beba6d9ac_522x126.png) ## 长度 长度在这里并不需要理会,对应mysql 类型为 text ## 键名名称 与 键值名称 如下图所示 ![](https://img.kancloud.cn/6a/fd/6afd09f8d3f54d25893b4b3e31e1523d_541x115.png) ## 模板获取值 例如填了以下值 ![](https://img.kancloud.cn/9a/80/9a80d75855c40ea59a01b5ac9a8f8a98_527x119.png) 假设变量是$Info ``` <pre class="calibre20">``` <span class="token3">1.</span> 循环输出,字段名称是你增加的字段名 <span class="token1">{</span>hkcms<span class="token1">:</span>volist name<span class="token">=</span><span class="token4">"$Info['字段名称']"</span> id<span class="token">=</span><span class="token4">"item"</span><span class="token1">}</span> <span class="token"><</span>p<span class="token">></span><span class="token1">{</span>$key<span class="token1">}</span> <span class="token">-</span> <span class="token1">{</span>$item<span class="token1">}</span><span class="token"><</span><span class="token">/</span>p<span class="token">></span> <span class="token1">{</span><span class="token">/</span>hkcms<span class="token1">:</span>volist<span class="token1">}</span> <span class="token3">2.</span> 给定元素输出 <span class="token1">{</span>$Info<span class="token1">[</span><span class="token4">'字段名称'</span><span class="token1">]</span><span class="token1">[</span><span class="token4">'键名称'</span><span class="token1">]</span><span class="token1">}</span> 如上图,键名为ceshi <span class="token1">{</span>$Info<span class="token1">[</span><span class="token4">'字段名称'</span><span class="token1">]</span><span class="token1">[</span><span class="token4">'ceshi'</span><span class="token1">]</span><span class="token1">}</span> 输出 abc ``` ```