|
php wizards i have a question
Imagine i have and object with 50 values:
$my_obect->value_1
$my_obect->value_2
$my_obect->value_3
etc etc..
I want to add all values:
$total = $my_object->value_1 + $my_object->value_2 etc etc..
Is there a faster way to do it?
Replacing the number for a var ($my_object->value_$i or {$i} etc) in a while loop doesnt work as it would with normal vars..
|