I have the answer for you, but I'm having trouble following your database structure.
Here is a small database you can create and then the php code
that grabs the info in the form you like.
it should point you in the write direction.
db dump:
DROP TABLE IF EXISTS tbl1;
CREATE TABLE tbl1 (
user_first varchar(100) NOT NULL default '',
id int(11) NOT NULL default '0',
stat varchar(100) NOT NULL default '',
user_last varchar(100) NOT NULL default ''
) TYPE=MyISAM;
--
-- Dumping data for table tb1
/!40000 ALTER TABLE tb1 DISABLE KEYS /;
LOCK TABLES tbl1 WRITE;
INSERT INTO tbl1 VALUES ('David',1,'employee','Rogers'),('Bill',2,'employee','Helmick'),('Dan',3,'employee','Hines');
UNLOCK TABLES;
/!40000 ALTER TABLE tb1 ENABLE KEYS /;
--
-- Table structure for table tbl2
DROP TABLE IF EXISTS tbl2;
CREATE TABLE tbl2 (
dep_first varchar(100) NOT NULL default '',
id int(11) NOT NULL default '0',
stat varchar(100) NOT NULL default '',
dep_last varchar(100) NOT NULL default ''
) TYPE=MyISAM;
--
-- Dumping data for table tbl2
/!40000 ALTER TABLE tbl2 DISABLE KEYS /;
LOCK TABLES tbl2 WRITE;
INSERT INTO tbl2 VALUES ('Beth',1,'spouse','Rogers'),('Dirk',1,'dependent','Rogers'),('Gorgan',1,'dependent','Rogers'),('Alice',1,'dependent','Rogers'),('Steve',2,'dependent','Helmick'),('Susan',2,'spouse','Helmick'),('Jamie',3,'spouse','Hines'),('Jenifer',3,'dependent','Hines');
UNLOCK TABLES;
PHP code to retreive the info
$sql = "select concat(tbl1.user_last ,' ', tbl1.user_first) as names1, tbl1.stat as empstat, concat(tbl2.dep_last ,' ', tbl2.dep_first) as names2, tbl2.stat as depstat "
."from tbl1, tbl2 "
."where tbl1.id = tbl2.id "
."order by tbl1.user_first";
$result = mysql_query($sql);
print "<table>\n";
$user3 = "XXXXX";
while($test = mysql_fetch_array($result)){
$user1 = $test['names1'];
$user2 = $test['names2'];
$stat1 = $test['empstat'];
$stat2 = $test['depstat'];
if($user3 != $user1){
print "<tr>\n";
print "<td>$user1</td><td>$stat1</td>\n";
print "</tr>\n";
$user3 = $user1;
}
print "<tr>\n";
print "<td>$user2</td><td>$stat2</td>\n";
print "</tr>\n";
}
print "</table>\n";