//printing titles of resultset;
for($i=0;$ i<mysql_num_fields($result);$i++) $title[]=str_replace('_',' ',mysql_field_name($result,$i));
echo "<tr><td>".implode('<td>',$title);
raymie
watch this
echo "<tr><td>".implode('<td>',$title);
should be out the for cicle;
for($i=0;$ i<mysql_num_fields($result);$i++) {
$title[]=str_replace('_',' ',mysql_field_name($result,$i));
}
//This is out the for cicle first you put all fields name in an array
//then you implode that array.
//Check the implode and explode functions in manual
//Check too associative and index arrays this is a php powerfull thing
echo "<tr><td>".implode('<td>',$title);