shockshell
Erfahrenes Mitglied
Also etwas in der Art:
PHP:
echo '<script language="JavaScript1.2">
var head="display:\'\'"
function doit(item){
header=document.getElementById(item);
var head=header.style
if (head.display=="none")
head.display=""
else
head.display="none"
}
</script>';
$irgendeinezahl=20;
for($x=0;$x<$irgendeinezahl;$x++){
echo '<div style="cursor: hand;" onclick="doit(\'content'.$x.'\')">
LINKÜBERSCHRIFT'.$x.'
</div>
<span style="display:none" id="content'.$x.'">
<span style="margin-left:5px"><a href="">Unterlink'.$x.'-1</a></span><br>
<span style="margin-left:5px"><a href="">Unterlink'.$x.'-2</a></span><br>
<span style="margin-left:5px"><a href="">Unterlink'.$x.'-3</a></span><br>
<span style="margin-left:5px"><a href="">Unterlink'.$x.'-4</a></span><br/>
</span></div>';
}