【问题标题】:Laravel 6 -loop through and display the values in bladeLaravel 6 - 循环并显示刀片中的值
【发布时间】:2020-06-12 07:47:45
【问题描述】:

我想遍历值并将其显示在刀片​​模板中(数组包含元素内的结果,然后是要获取的值。

【问题讨论】:

标签: php html arrays json laravel


【解决方案1】:

在刀片中你应该使用刀片的@foreach 函数:

@foreach($arr['result']['elements'] as $val)
    {{-- You ar in loop and write your html here --}}
@endforeach

希望对你有帮助

【讨论】:

    猜你喜欢
    • 2017-09-26
    • 2018-04-04
    • 1970-01-01
    • 2018-04-19
    • 2017-11-13
    • 2019-09-20
    • 1970-01-01
    • 2016-06-29
    • 2019-09-11
    相关资源
    最近更新 更多