//a little stuff to make the headers fit a size, of curse you can resize the 'columns'
$id = "id";
$id = str_pad($id, 5, " ");
$name = "Name";
$name = str_pad($name, 12, " ", STR_PAD_BOTH);
$age = "age";
$age = str_pad($age, 5, " ",STR_PAD_LEFT);
$color = "color";
$color = str_pad($color, 12, " ", STR_PAD_BOTH);
$write = $id . $name . $age . $color . "\n";
//the next stays the same
$handle = fopen($txt, 'atb');
fwrite($handle, $write);
fclose($handle);
//then apply the same style to the content
//i made a little change on the name, you can do what you want
while ($db_row=mysql_fetch_array($db_table)){
extract($db_row);
$id = str_pad($id, 5, " ");
$name = str_pad($name, 12, " ");
$age = str_pad($age, 5, " ",STR_PAD_LEFT);
$color = str_pad($color, 12, " ", STR_PAD_BOTH);
$somecontent = $id . $name . $age . $color . "\n";
//the rest is the same
hope this gives ya an idea of what u can do and how to do it, have fun