I run the block of code and out comes an array with two copies of the same object:
Code: Select all
foreach ( $dbInfo as $this_index => $this_db_data ) {
$objsї] = new $obj_type( $this_db_data, true );
}$obj_type comes from above and is just a name of the class. The objects do seem to end up being the proper class.
When I do a similar block:
Code: Select all
foreach ( $dbInfo as $this_index => $this_db_data ) {
$new_obj = new $obj_type( $this_db_data, true );
print_r($new_obj);
$objsї] = $new_obj;
}This doesn't make any sense to me.
Any insight?
Thanks
-Asher