hi
i have a function:
function gwiazdki() {
$szare = 5 - $this->Trudnosc;
for($i=1; $i<=$this->Trudnosc; $i++) {
echo "<img src='../../themes/tutorial/images/gwiazdka_zolta.jpg' width='14' height='13' alt='trudnosc' class='trudnosc' />";
}
for($i=1; $i<=$szare; $i++) {
echo "<img src='../../themes/tutorial/images/gwiazdka_szara.jpg' width='14' height='13' alt='trudnosc' class='trudnosc' />";
}
}
$Trudnosc is a number: 0,1,2,3,4 or 5
and in template i put
$gwiazdki
but function runs on top of the site before <html> tag, why ?
<img src='../../themes/tutorial/images/gwiazdka_zolta.jpg' width='14' height='13' alt='trudnosc' class='trudnosc' /><img src='../../themes/tutorial/images/gwiazdka_zolta.jpg' width='14' height='13' alt='trudnosc' class='trudnosc' /><img src='../../themes/tutorial/images/gwiazdka_szara.jpg' width='14' height='13' alt='trudnosc' class='trudnosc' /><img src='../../themes/tutorial/images/gwiazdka_szara.jpg' width='14' height='13' alt='trudnosc' class='trudnosc' /><img src='../../themes/tutorial/images/gwiazdka_szara.jpg' width='14' height='13' alt='trudnosc' class='trudnosc' /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>