我有一个多维数组,如下所示
array() {
["type1"] =>
array() {
["ticket1"] =>
array(9) {
// ticket details here
}
["ticket2"] =>
array(10) {
// ticket details here
}
["ticket3"] =>
array(9) {
// ticket details here
}
}
["type2"] =>
array() {
["ticket1"] =>
array(9) {
// ticket details here
}
["ticket2"] =>
array(10) {
// ticket details here
}
["ticket3"] =>
array(9) {
// ticket details here
}
}
}
Run Code Online (Sandbox Code Playgroud)
等等
我试图计算数组中的票证总数(二级项目的数量),但类型的数量是可变的,每个票证的字段数也是如此,所以我不能使用COUNT_RECURSIVE和数学来得到号码.
谁能帮我?