The error you are getting is probably something along the lines of "can not re-declare function getname". This is because you have the function definition inside of your <b>for</b> loop; essentially re-declaring the function with every record you read.
Since the definition of the lookup array never changes, you can safely put that up at the top of your page so it happens only once. This is also where you should define the function.
Take a look at the corrected code below and I think things will start to make more sense to you.
=============================
<?php
function getname ($s_type, $seminar)
{
nbsp;return $seminar[$s_type];
}
$seminar['power']='The Power of Language';
$seminar['buddha']='From Buddha to Batman';
$seminar['unshakeable']='Unshakeable Strength in Adversity';
$seminar['tracking']='Tracking the Wounded Bear';
$seminar['omega']='The Omega Leader';
$seminar['keeping']='Keeping the Coal Out of Your Stocking';
$connection = mysql_connect ("localhost", "user", "pass");
if ($connection == false){
nbsp; echo mysql_errno().": ".mysql_error()."<BR>";
nbsp; exit;
}
$query = "SELECT event_id,event_name,date_format(start_date, '%M %d') AS Readable_Date,date_format(end_date, '%M %d, %Y') AS Readable_Date_2,seminar_type,seminar_name from events ORDER BY start_date";
$result = mysql_db_query ("thinktpc", $query);
if ($result){
nbsp; echo "<table class=body width=100% border=0>";
nbsp; echo "<tr><td bgcolor=#CCCC33> Event Location</td><td bgcolor=#6666CC> Seminar Type</td></tr>\n<tr><td> </td><td> </td></tr>";
nbsp; $numOfRows = mysql_num_rows ($result);
nbsp; for ($i = 0; $i < $numOfRows; $i++){
nbsp;nbsp; $name = mysql_result ($result, $i, "event_name");
nbsp;nbsp; $start_date = mysql_result ($result, $i, "Readable_Date");
nbsp;nbsp; $end_date = mysql_result ($result, $i, "Readable_Date_2");
nbsp;nbsp; $s_type = mysql_result ($result, $i, "seminar_type");
nbsp;nbsp; $e_id = mysql_result ($result, $i, "event_id");
nbsp;nbsp; $s_name = getname($s_type, $seminar);
nbsp;nbsp; echo "<tr><td><a href=\"index.php?page=moreinfo&event=$e_id\">$name</a></td><td><a href=\"$s_type.htm\">$s_name</a></td></tr>\n
<tr colspan=2><td>$start_date thru $end_date<br><br></td><td> </td></tr>";
nbsp; }
echo "</table>";
}
else{
nbsp; echo mysql_errno().": ".mysql_error()."<BR>";
}
mysql_close ();
?>
HTH
-- Rich Rijnders
-- Irvine, CA US