Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要这样的东西:
@if ($array.length > 0) {{-- expr --}} @endif
这可能吗?
可以使用该count功能,如下所示:
count
@if (count($array) > 0) {{-- expr --}} @endif
您可以使用 PHP计数函数来计算数组的长度。