Count number of array elements inside multidimensional array
Posted: Thu May 17, 2007 5:10 am
Hi All,
As the subject suggests how do I count the number of inner arrays in a multiD array?
Here's the 2 arrays I wish to run a conditional statement over. I can see the count there I am unsure on how to access it.
If sub-array has 2 elements do this else if has 3 elements do this.
Any pointers or suggestions?
tia, Will.
As the subject suggests how do I count the number of inner arrays in a multiD array?
Here's the 2 arrays I wish to run a conditional statement over. I can see the count there I am unsure on how to access it.
If sub-array has 2 elements do this else if has 3 elements do this.
Code: Select all
array(5) {
[0]=>
array(2) {
[0]=>
int(37)
[1]=>
string(7) "21406.8"
}
}Code: Select all
array(6) {
[0]=>
array(3) {
["client_id"]=>
string(2) "97"
["totalThisQuater"]=>
string(6) "780.22"
["totalLastQuater"]=>
string(6) "487.83"
}
}tia, Will.