Well, creating arrays of objects is pretty straight forward. In you code, I don't know waht $a is, but you can't create a new "$" anything. If you have a class definition called "a" then you create a new instance of it with:
$obj = new a; //no $dollar sign on a
Also, the $cont variable is not necessary the way you are using it, you can just assign your objects to the array directly:
$busquedas_obj[] = $obj; // indexes are assigned sequentially, anyway
When you say "this seems empty", what do you mean? How are you checking for a value in the array? Normally you should be looking for a property of the object in the array, not the object itself.
Look at the following example for illustration:
=================================
<?php
class MyObj
{
var $color;
function MyObj ($incolor) {
$this->color = $incolor;
}
}
$objptr = new MyObj('red');
$objary[] = $objptr;
$objptr = new MyObj('white');
$objary[] = $objptr;
$objptr = new MyObj('blue');
$objary[] = $objptr;
print $objary[0]->color."<BR>";
print $objary[1]->color."<BR>";
print $objary[2]->color."<BR>";
?>
OK! OK! All you object purists out there; I know my examlple sets and accesses the property directly and I should have created methods for setting and retrieving it, but it is a simple example so don't flame me...(sheesh!)
HTH
-- Rich Rijnders
-- Irvine, CA US