can i use stdClass like an array?

Complicated

New Member
is it possible to make stdClass objects work like a generically indexed array?i.e.$array = Array([0] => 120[1] => 382[2] => 552[3] => 595[4] => 616)would be constructed like \[code\]$a = array();$array[] = 120;$array[] = 382;\[/code\]etc.but if i do that with an object it just overwrites itself:\[code\]$obj = new stdClass;$obj->a = 120;$obj->a = 382;\[/code\]i know i can change 'a' every time,sorry if this is a stupid question but it's stumping me for some reason!Appreciate any help :)Dan
 
Back
Top