刀片正在回荡1

发布于 2025-01-19 06:37:54 字数 234 浏览 5 评论 0原文

我正在尝试使用Blade {! !!}

使用this {!! !!}它显示了我还需要显示1的值 我已经丢弃了这样的功能,

{!! var_dump(ma_fonction)!!}

它向我显示了结果,然后显示bool(true)

有人对此有任何想法吗?

提前致谢

I am trying to echo result of a function using blade {!! !!}

Using like this {!! !!} It shows the value that I need besides of showing 1
I have var dumped the function doing like this

{!! var_dump(ma_fonction)!!}

It shows me the result and after it , it shows bool(true)

Does anyone has an idea about this?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

玻璃人 2025-01-26 06:37:54

这是因为 var_dump 函数的默认行为。
了解更多信息此处

您还可以考虑 var_export

its because of default behaviour of var_dump function.
learn more here.

you could also consider var_export

格子衫的從容 2025-01-26 06:37:54

您的函数很可能返回一个数组。数组中的最后一个字段可能是一个键 =>布尔。例如:

array(5) { ["description"]=>;字符串(6)“a” [“isSomething”] => string(4) "true" }

如果你想打印描述,请使用:

@php $data = ma_function(); @endphp
{!! $data['description'] !!}

Very likely your function returns an array. And probably the last field in the array is a key => bool. For exapmple:

array(5) { ["description"]=> string(6) "<b>a</b>" ["isSomething"]=> string(4) "true" }

If you want print the description the use:

@php $data = ma_function(); @endphp
{!! $data['description'] !!}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文