Assumed that $old_array is an array.

{def $new_array = array()}
{
foreach $old_array as $key=>$model}
{set
$new_array = $new_array|append($model)}
{
/foreach}
Pay attention to the code: {set $new_array = $new_array|append($model)}, we have to use "set" to add the value to the array!

So wired!

相关文章:

  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2021-09-08
  • 2021-12-13
  • 2021-08-21
  • 2021-06-05
  • 2021-11-08
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2022-03-05
  • 2021-06-09
  • 2021-12-19
  • 2021-09-24
  • 2022-03-07
相关资源
相似解决方案