Bonjour
J'aimerai savoir si on peut faire un count en javascript pour le mettre dans un script php. J'ai besion davoir un rowspan dynamique. voici mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<table width="100%"> <?  require_once "classes/wine.class.php"; 
                    $X=new vin();
 
 $x=$X->showwinesectvinc();
foreach ($x as $sectc) { 
?><tr>
            <td colspan="4"><h1 align="center" class="vintitreT"><?=$sectc['section']?>
            </h1></td>
        </tr><?
         $x=$X->showwinesect($sectc['section']);
        foreach ($x as $sect) {
        if ($sect['ssection'] !=''){
    $i=1;
?>
<tr>
            <td rowspan="<? echo $i;?>"><h2 class="vintitreT"><?=$sect['ssection']?>
            </h2></td>
 
<? }
 
$x=$X->showwinescat($sectc['section'],$sect['ssection']);
    foreach ($x as $scat) {
 
 
    $x=$X->showwinebyss($scat['scat'],$sectc['section'], $sect['ssection']);
 
foreach ($x as $vin) {
 
$i++;
  ?>  
 
            <td class="tabnom"><p class="vinnom"><?=$vin['nom']?><? if ($vin['scat'] != ''){?>&nbsp;&nbsp;<em class="default"><? echo $vin['scat']?></em><? }?></p></td>
            <td class="tabmille"><?=$vin['annee']?></td>
            <td class="tabprix"><?=$vin['prixbout']?>&nbsp;$</td>
 
<? echo "</tr>";}}} }?></table>
En php je ne peux pas le faire pcq le rowspan est plus haut et le count(plus le $i++) c'est fait plus bas

merci de votre aide