【问题标题】:Convert PHP object to associative array and convert not enough将 PHP 对象转换为关联数组并且转换不够
【发布时间】:2022-11-22 06:19:49
【问题描述】:

我正在使用此代码将 PHP 对象转换为关联数组。 enter image description here 输入: enter image description here 然后输出: enter image description here 在“task.type”中不能是关联数组!

我想要这样: enter image description here 非常感谢!

【问题讨论】:

标签: php object associative-array


【解决方案1】:

如果您需要从您的请求中获取关联数组,请尝试:

json_decode($request, true)

【讨论】:

    猜你喜欢
    • 2011-05-19
    • 1970-01-01
    • 1970-01-01
    • 2016-03-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多