我想为循环中的accordion创建几个标题。可以有不同数量的过程。
<script type="text/javascript">
$(function() {
$(".Accordion").accordion({heightStyle:"content", collapsible:true});
});
<script>
<?php
for($y=0;$y<$len;$y++) {
$result3 = getProcessNumber($projectNo, $holdprocess[$y]);
if (!$result3) {
die('Invalid query: ' . mysql_error());
}
while($row3 = mysqli_fetch_array($result3)) {
$assigned = $row3['assigned'] ;
}
?>
<div class='Accordion'>
<h3>Process <?php echo $holdprocess[$y] ?> </h3>
<div class='proc'>
<div class='name'>Process: <?php echo $holdprocess[$y] ?>
<div class='nmbr'>People required: <div class='numbr'><?php echo $holdnumber[$y] ?></div>
</div>
</div>
<div class='assigned' name='assigned[]' >People Assigned: <?php echo $assigned ?></div>
</div>
</div>
<?php
}
?>