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 )
wou
Only for the sake of OOP, don't use classes. If you really want to implement this functionality, use this class:
class ArrayClass
{
protected $storage = array();
public function push($content) {
$this->storage[] = $content;
return $this;
}
public function get($index) {
if (isset($this->storage[$index])) {
return $this->storage[$index];
} else {
//throw an error or
return false;
}
}
}