Timber TWIG使数组移位并添加到结尾

我使用的是Wordpress Timber, 它使用TWIG作为模板化封隔。我正在尝试移动阵列, 因此可以使用TWIG对其进行循环。

array('Anna', 'Ben', 'Caroline', 'Emma', 'Daniel')

最终应该这样:

array('Ben', 'Caroline', 'Emma', 'Daniel', 'Anna')

Timber有办法做到这一点吗, 还是我必须通过PHP做到这一点?


#1


就像DarkBee建议的那样, 用PHP轻松解决它。

来源:

https://www.srcmini02.com/63975.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_41586.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?