$xxx[0] = "genre";
$xxx[1] = "property";
$xxx[2] = "actress";

$i=0;
$g=0;
while ( $i < count($xxx) ) {
$sql = "select $xxx[$i]_id,$xxx[$i]_name from $xxx[$i]";
$result = mysql_query ( $sql );
while ( $data = mysql_fetch_array ( $result ) ) {
$xxb[$g][$xxx[$i]]['id'] = $data[0];
$xxb[$g][$xxx[$i]]['name'] = $data[1];
$g++;
}
$i++;
}
これでいい?