I never got this to work with PHP 3. It works fine, however in PHP 4. I never saw any documentation that said one way or the other, so I consider it a bug. Upgrading to PHP 4 is a must if you want to do this.
However, I think that PHP 3 supports having an array of arrays.
For instance you could have:
$results = array($array1, $array2, ...);
And have $array1[name] and whatever the properties for the object you had in the array.
For instance, if you had:
class foo {
var $name, $addy, $phone;
}
$object1 = new foo;
$object1->name = "foo";
$object1->addy = "123 Main";
$object1->phone = "555.1212";
you could do the same thing like so:
$array1[name] = "foo";
$array1[addy] = "123 Main";
$array1[phone] = "555.1212";
If you had methods in the class, you would have to do something creative to replace them.