官方的解释:field支持用array获取任意字段的值;(支持标记:文章列表模板的 {dede:field /}、arclist、arclistsg、loop、sql 标签)通俗点来讲,这就是查询数据库得到的一组数据的集合例如平时使用
{dede:field /}
就可以使用
{dede:field runphp='yes'} @me=@me[‘title'];{/dede:field}
最主要是,很多时候,有些人的php标签需要
同时处理两个或以上字段参数的,用这个就相当方便!
例如需要有短标题就显示短标题、没有短标题就显示长标题:
{dede:field runphp='yes'}
if (@me[‘shorttitle']==”)
@me=@me[‘title'];
else
@me=@me[‘shorttitle'];
{/dede:field}

博悦天下


![[email protected] :美国/新加坡/香港多机房VPS特价优惠中,年付$20起-博悦天下](https://www.ibytx.com/wp-content/uploads/2021/01/20210127_6010ff4ec740f.png)




