如何顯示以上值作爲頁面明智,排序和搜索選項?如何在PHP中提取這些值並以表格格式顯示它?
stdClass的對象 ( [totalcdrcount] => 11 [CDR的] =>數組 ( [0] => stdClass的對象 ( [calldate] => 2014-10-31T16:02:38+ 05:30 [SRC] => 1111 [DST] => 1978 [頻道] => SIP/1111-0000000f [dstchannel] => SIP/1978-00000010 [配置] => ANSWERED [UNIQUEID] => 1414751558.15 [duration] => 511 [billsec] => 508 [accountcode] => )
[1] => stdClass Object
(
[calldate] => 2014-10-31T16:02:22+05:30
[src] => 1111
[dst] => 1111
[channel] => SIP/1111-0000000e
[dstchannel] =>
[disposition] => ANSWERED
[uniqueid] => 1414751542.14
[duration] => 13
[billsec] => 13
[accountcode] =>
)
[2] => stdClass Object
(
[calldate] => 2014-10-31T15:33:22+05:30
[src] => 1111
[dst] => 1978
[channel] => SIP/1111-0000000c
[dstchannel] => SIP/1978-0000000d
[disposition] => ANSWERED
[uniqueid] => 1414749802.12
[duration] => 1730
[billsec] => 1722
[accountcode] =>
)
[3] => stdClass Object
(
[calldate] => 2014-10-31T15:31:18+05:30
[src] => 1978
[dst] => 1111
[channel] => SIP/1978-0000000a
[dstchannel] => SIP/1111-0000000b
[disposition] => ANSWERED
[uniqueid] => 1414749678.10
[duration] => 117
[billsec] => 110
[accountcode] =>
)
[4] => stdClass Object
(
[calldate] => 2014-10-31T15:31:04+05:30
[src] => 1111
[dst] => 1978
[channel] => SIP/1111-00000009
[dstchannel] =>
[disposition] => ANSWERED
[uniqueid] => 1414749664.9
[duration] => 10
[billsec] => 10
[accountcode] =>
)
[5] => stdClass Object
(
[calldate] => 2014-10-31T15:30:30+05:30
[src] => 1978
[dst] => 1111
[channel] => SIP/1978-00000007
[dstchannel] => SIP/1111-00000008
[disposition] => ANSWERED
[uniqueid] => 1414749630.7
[duration] => 28
[billsec] => 21
[accountcode] =>
)
[6] => stdClass Object
(
[calldate] => 2014-10-31T15:30:11+05:30
[src] => 1111
[dst] => 1978
[channel] => SIP/1111-00000005
[dstchannel] => SIP/1978-00000006
[disposition] => NO ANSWER
[uniqueid] => 1414749611.5
[duration] => 4
[billsec] => 0
[accountcode] =>
)
[7] => stdClass Object
(
[calldate] => 2014-10-31T15:29:24+05:30
[src] => 1111
[dst] => 1978
[channel] => SIP/1111-00000004
[dstchannel] =>
[disposition] => ANSWERED
[uniqueid] => 1414749564.4
[duration] => 17
[billsec] => 17
[accountcode] =>
)
[8] => stdClass Object
(
[calldate] => 2014-10-31T15:28:36+05:30
[src] => 1978
[dst] => 1111
[channel] => SIP/1978-00000002
[dstchannel] => SIP/1111-00000003
[disposition] => ANSWERED
[uniqueid] => 1414749516.2
[duration] => 43
[billsec] => 39
[accountcode] =>
)
[9] => stdClass Object
(
[calldate] => 2014-10-31T15:19:18+05:30
[src] => 1978
[dst] => *97
[channel] => SIP/1978-00000001
[dstchannel] =>
[disposition] => ANSWERED
[uniqueid] => 1414748958.1
[duration] => 25
[billsec] => 25
[accountcode] =>
)
[10] => stdClass Object
(
[calldate] => 2014-10-31T15:18:42+05:30
[src] => 1978
[dst] => *79
[channel] => SIP/1978-00000000
[dstchannel] =>
[disposition] => ANSWERED
[uniqueid] => 1414748922.0
[duration] => 4
[billsec] => 4
[accountcode] =>
)
)
)
如何顯示上述明智值頁面,排序和搜索選項?
你可以使用:https://github.com/hakre/print_r-converter - 但不要儲存的print_r()首先輸出。使用更便攜的東西,比如'var_export()'或'json_encode()'。 – 2014-11-03 16:14:57