counting array items belonging to a class object - works?
Posted: Thu Apr 10, 2003 1:35 pm
I am counting items that belong to each object in a class array. It appears to work, but when I enable error_reporting(E_ALL) to make sure, I get the following error:
Undefined property: aryTxns [in file on line nnn]
Class looks roughly like this:
Resource[]->aryTxns[]->property1 ...
Array of class objects looks like this:
$aryResources
The code to perform the count the transactions owned by each resource:
$intTotalTxns += count($aryResources[$intLoopCtr]->aryTxns);
Do we consider the use of array functions on class objects as operative, and force ourselves to ignore the warnings?
TIA
Undefined property: aryTxns [in file on line nnn]
Class looks roughly like this:
Resource[]->aryTxns[]->property1 ...
Array of class objects looks like this:
$aryResources
The code to perform the count the transactions owned by each resource:
$intTotalTxns += count($aryResources[$intLoopCtr]->aryTxns);
Do we consider the use of array functions on class objects as operative, and force ourselves to ignore the warnings?
TIA