
August 11th, 2002, 05:18 AM
|
|
|
|
Join Date: Apr 2007
Location: Melbourne, Vic, Aus
Posts: 7
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Array Classes
I have defined a class called order and definied a new variable using this class (as an array).
class order
{
var $pr_code;
var $pr_quan;
}
$ord_item = array();
$ord_item[] = new order
Now that I've defined these, I want to save the information into the variable class.
So far I'm looking at the following code:
array_push($ord_item, $ord_item->pr_code = $pr_code, $ord_item->pr_quan = $pr_quan);
I have not tried this code as it does not look right. Is there a certain way of adding a new order to the end of the array and store both class values?!
Assistance Would Be Great
|