Hi Wauzy,
hab's mal so getestet:
PHP-Code:
$ausz['a1']=3;
$a_tags['a1']="<img src="http://www.selfphp.info/src/logo.gif" alt="Für 5 gespielte Trainings in Folge" width="30">";
function add($bild,$anz)
{
if ($anz==0){$ausgabe="";};
if ($anz==1){$ausgabe=$bild;};
if ($anz==2){$ausgabe=$bild.$bild;};
if ($anz==3){$ausgabe=$bild.$bild.$bild;};
return $ausgabe;
}
echo add($a_tags['a1'],$ausz['a1']);
Funktioniert tadelos!
Grüsse
chris17