【问题标题】:read value from a JSON in PHP从 PHP 中的 JSON 读取值
【发布时间】:2017-03-27 11:22:59
【问题描述】:

如何在 PHP 中从 JSON 中读取值?我需要来自mandant->名称和缩写的用户名、密码和值

谢谢

【问题讨论】:

标签: php json symfony


【解决方案1】:

感谢您的帮助。这是我的解决方案:

   $json = $request->getContent();
   $arrayJson = json_decode($json, true);
   $user = $arrayJson['user'];
   $password = $arrayJson['password'];
   $mandant = $arrayJson['mandant'];
   $mandantName = $mandant('name');
   $mandantAbbr = $mandant('abbr');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-05-23
    • 1970-01-01
    • 2018-12-02
    • 2016-10-12
    • 1970-01-01
    • 1970-01-01
    • 2020-12-06
    相关资源
    最近更新 更多