One way to create dynamic titels in a module, is to change the variabele $pagetitle. This should be done before header.php is called. That call is executed by the include-statement include("header.php");

In the module ADSLLog I've done it like this:

/*
** Dependant of the function, change the pagetitle
*/
switch($func) {
case "today": $pagetitle = "- ADSL internet traffic statistics for today"; break;
case "thismonth": $pagetitle = "- ADSL internet traffic statistics for this month"; break;
case "thisyear": $pagetitle = "- ADSL internet traffic statistics for this year"; break;
case "average": $pagetitle = "- Average ADSL internet traffic statistics"; break;
case "all": $pagetitle = "- Total ADSL internet traffic statistics"; break;
case "day": $pagetitle = "- ADSL internet traffic statistics for the day $day-".$months[(int) $month ]."-$year"; break;
case "month": $pagetitle = "- ADSL internet traffic statistics for the month ".$months[(int) $month ]."-$year"; break;
case "year": $pagetitle = "- ADSL internet traffic statistics for the year $year"; break;
case "week": $pagetitle = "- ADSL internet traffic statistics for the last weeks"; break;
case "thisweek": $pagetitle = "- ADSL internet traffic statistics for the week $week-$year"; break;
default: $pagetitle = "- ADSL internet traffic statistics"; break;
}
include("header.php");