douhei8633 2011-06-21 05:24
浏览 36

PHP和JSON - 如何将关联数组插入到关联数组中,每个新数组的名称不是0,1,2,3等

is there any library that can inspect and display what are the arguments that a method takes?{"0": {"sessionID":"9", "sessionName":"dataName0", "sessionCount":100, "sessionDC":"12:11AM - Jun 06 11", "sessionDM":"01:00AM - Jan 01 70", "sessionActive":"1"}, "1": {"sessionID":"10", "sessionName":"dataName1", "sessionCount":100, "sessionDC":"05:04PM - Jun 06 11", "sessionDM":"01:00AM - Jan 01 70", "sessionActive":"1"}, "userID":"1", "userName":"Ezra", "total":2}

  • 写回答

1条回答 默认 最新

  • doulin3510 2011-06-21 06:10
    关注

    Your title doesn't match your question, but I can answer the part about inspecting the arguments that a method takes:

    func_get_args()
    

    Gets an array of the function's argument list.

    This function may be used in conjunction with func_get_arg() and func_num_args() to allow user-defined functions to accept variable-length argument lists.

    As for the title:

    Any array can contain a named sub array.

    $arr = array("name" => "bob")
    
    $person = array();
    $person['data'] = $arr;
    
    Array([data] => Array([name] => bob))
    
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?