Object Array Iterator
Posted: Mon Oct 23, 2006 9:49 am
Hi guys,
I have a quick question about storing objects in arrays.
I have a class called customersale, I can store these in an array.
The class customersale has functions such as getprice(),gettransactiondate() etc....
How do I iterate through this array and retrieve a certain customersale object and apply the class's functions?
Thanks
I have a quick question about storing objects in arrays.
I have a class called customersale, I can store these in an array.
Code: Select all
while ($row = oci_fetch_array ($s, OCI_BOTH))
{
$customersaleid = $row['CUSTOMERSALEID'];
$customersale = new customersale($customersaleid);
echo $customersale->getprice();
$customersalearray[$ctr] = $customersale;
$ctr = $ctr + 1;
}How do I iterate through this array and retrieve a certain customersale object and apply the class's functions?
Thanks