2 résultats trouvés
- par smax
- 14 juin 2011, 18:11
- Forum : PHP débutant
- Sujet : Boucle sous_tableaux
- Réponses : 3
- Vues : 734
<?php
function afficher($liste)
{
foreach($liste as $tab)
{
if(is_array($tab))
{
for($i=0; $i<count($liste[0]);$i++)
{
$tab1[$i][] = $tab[$i]; //verbe 1 etc..
}
}
}
return $tab1;
}
?>
- par smax
- 14 juin 2011, 17:43
- Forum : PHP débutant
- Sujet : Boucle sous_tableaux
- Réponses : 3
- Vues : 734
Bonjour, J'ai un tableau qui contient une liste de verbes pour chaque verbe j'ai besoin de le stocker dans un tableau ici $tab <?php function afficher($liste) { foreach($liste as $tab) { if(is_array($tab)) { $tab1['un'][] = $tab[0]; //verbe 1 etc.. $tab1['deux'][] = $tab[1]; } } return $tab1; } ?> C...
Nous sommes le 20 juin 2026, 09:56