Possible Duplicate:
Diddling with arrays with numeric string keys
As specified in PHP's manual, we can do type casting on objects and covert them to array as follows:
$arrayResult = (array)$someObject;
But I found very interesting remark in documentation:
If an object is converted to an array, the result is an array whose elements are the object's properties. The keys are the member variable names, with a few notable exceptions: integer properties are innaccessible
What does "integer properties" stands for?
$obj->{10} = 'this is int prop';- for more: stackoverflow.com/questions/12846936/…