<?
  include "../../mainfile.php";
?>
<?
  function getTblField($tblname){
  
    $query = "SHOW COLUMNS FROM ".$tblname;
    $result = mysql_query($query);
    $num = mysql_num_rows($result);
    $i=0;
    while($i<$num){
  
      $tfld = mysql_result($result,$i,"Field");
      $arrOutput[$i] = $tfld;
  
      $i++;
    }
	
	return $arrOutput;
	
  }

  $arrTblField = getTblField("xoops_pc_holiday");

  $query = "SELECT * FROM xoops_pc_holiday";
  $result = mysql_query($query);
  $num = mysql_num_rows($result);
  $i=0;
  while($i<$num){

    foreach($arrTblField as $tfield){
	
      $tval = mysql_result($result,$i,$tfield);
	  echo $tval . " - ";
	
	}
	
	echo "<br>";
  
    $i++;
  }
?>