vale ya esta conseguido
podemos ver el resultado aqui
ht tp://iberoanuncios.es/Basic2.php
pido perdon de nuevo a los moderadores por el enlaze.
y el codigo completo es este
Código HTML:
<head>
<style type="text/css">
* {
margin:0;
padding:0;
list-style:none;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
margin:10px;
}
#basic-accordian{
border:5px solid #EEE;
padding:5px;
width:350px;
position:absolute;
left:50%;
top:50%;
margin-left:-175px;
z-index:2;
margin-top:-100px;
}
.accordion_headings{
padding:5px;
background:#99CC00;
color:#FFFFFF;
border:1px solid #FFF;
cursor:pointer;
font-weight:bold;
}
.accordion_headings:hover{
background:#00CCFF;
}
.accordion_child{
padding:15px;
background:#EEE;
}
.header_highlight{
background:#00CCFF;
}
</style>
<script type="text/javascript" src="acordeon/accordian.pack.js"></script>
</head>
<body onload="new Accordian('basic-accordian',5,'header_highlight');">
<div id="basic-accordian" ><!--Parent of the Accordion-->
<!--Start of each accordion item-->
<div id="test-header" class="accordion_headings header_highlight" >Home</div><!--Heading of the accordion ( clicked to show n hide ) -->
<!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
<div id="test-content"><!--DIV which show/hide on click of header-->
<!--This DIV is for inline styling like padding...-->
<div class="accordion_child">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc ligula nisl, egestas non, pharetra vel, scelerisque accumsan, lacus. Proin nibh. Aenean dapibus. Quisque facilisis, ligula ut blandit hendrerit, purus neque rhoncus ipsum, sit amet ultrices mauris augue non arcu. Donec et sem nec libero viverra accumsan.<br /><br /> Quisque facilisis, ligula ut blandit hendrerit, purus neque rhoncus ipsum, sit amet ultrices mauris augue non arcu. Donec et sem nec libero viverra accumsan.
</div>
</div>
<!--End of each accordion item-->
<? $var='1' ?>
<?
$consultaCategorias = mysql_query("SELECT * FROM categoria ORDER BY categoria DESC;");
while($categorias = mysql_fetch_array($consultaCategorias)){
?>
<!--Start of each accordion item-->
<div id="test<? echo $var;?>-header" class="accordion_headings" ><? echo $categorias[categoria]; ?></div><!--Heading of the accordion ( clicked to show n hide ) -->
<!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
<div id="test<? echo $var;?>-content"><!--DIV which show/hide on click of header-->
<!--This DIV is for inline styling like padding...-->
<div class="accordion_child">
<?
$consultaCategorias2 = mysql_query("SELECT * FROM categorias WHERE categoria ='{$categorias[categoria]}' ORDER BY subcategoria;");
while($categorias2 = mysql_fetch_array($consultaCategorias2)){
$res = mysql_query("SELECT * FROM anuncio WHERE provincia LIKE'{$pr}' and categoria ='{$categorias[categoria]}'and subcategoria='{$categorias2[subcategoria]}';");
$registro = mysql_num_rows($res)
?>
<a href="../listado.php?%20categoria=<? echo $categorias[categoria]?>&%20subcategoria=<? echo $categorias2[subcategoria]?>">
<? if ($registro=="0"){ $registro=''; }echo $categorias2[subcategoria].'</a><span class="Estilo13">'.$registro.'</span><br >';}
?></div>
</div>
<!--End of each accordion item-->
<? $var=$var+'1';
} ?>
</div><!--End of accordion parent-->
</body>
espero que les pueda servir a algun usuario del foro
gracias a los que me contestaron y a los que les hice pensar
hasta el proximo problema
bye