ok... now I got another issue.
I have the class above. I want to fill the an array of that class like this:
$sql = "SELECT DISTINCT band FROM picturetable ORDER BY band";
$result = $datab->query($sql);
$bandarray = array();
while($myrow = $datab->fetch_array($result))
{
$b = new bandclass;
$b->setName("$myrow[band]");
$b->photo=1;
echo $b->getName();
array_push($bandarray, $b);
}
$sql = "SELECT DISTINCT band FROM playlisttable ORDER BY band";
$result = $datab->query($sql);
while($myrow = $datab->fetch_array($result))
{
if (contains ($bandarray, $myrow[band]))
{
// get the above class
$b->playlist = 1;
}
else
{
$b = new bandclass;
$b->setName("$myrow[band]");
$b->=1;
echo $b->getName();
array_push($bandarray, $b);
}
}
and so forth though all my tables.
is there a contains method for an array or objects?
Epecially since I've got to compare based on one member, the name member.
tia