Passer un tableau dans une fonction

Résolu
cs_gomoz Messages postés 134 Date d'inscription mardi 22 avril 2003 Statut Membre Dernière intervention 23 décembre 2009 - 8 juin 2005 à 18:29
cs_gomoz Messages postés 134 Date d'inscription mardi 22 avril 2003 Statut Membre Dernière intervention 23 décembre 2009 - 9 juin 2005 à 11:30
Bonjour,
Je cherche deseperement comment passer un tableau dans une fonction.

par exemple :

$tab=array(tata,toto);
echobis($tab);


fonction echobis($letab)
{
echo $letab[1];
}

=> ça m'affiche rien
heeelp please

[mailto:gomoz@free.fr Gomoz]

4 réponses

coucou747 Messages postés 12303 Date d'inscription mardi 10 février 2004 Statut Membre Dernière intervention 30 juillet 2012 44
8 juin 2005 à 20:09
$tab=array('tata','toto');
echobis($tab);



fonction echobis($letab)
{
echo $letab[1];
}


In a dream, I saw me, drop dead... U was here, U cried... It was just a deam, if I die, U won't cry, maybe, U'll be happy

[url]http://coucou747.hopto.org/url
3
malalam Messages postés 10839 Date d'inscription lundi 24 février 2003 Statut Membre Dernière intervention 2 mars 2010 25
9 juin 2005 à 10:28
Je refais la partie importante du messafe de Coucou lol :



$tab=array('tata','toto');
3
cs_gomoz Messages postés 134 Date d'inscription mardi 22 avril 2003 Statut Membre Dernière intervention 23 décembre 2009
9 juin 2005 à 11:30
arf oué mais je suis un boulet en faite. En faite je déclarais mon tableau comme ça :
$tab[]=array('tata','toto');
Encore plus fort quoi...
Bon bé merci quand même (y a certaine touches qu'on envie d'arracher du clavier qauant il y a des truc comme ça ...)

[mailto:gomoz@free.fr Gomoz]
3
dandy54000 Messages postés 10 Date d'inscription vendredi 2 janvier 2004 Statut Membre Dernière intervention 16 novembre 2005
8 juin 2005 à 18:58
essaye comme ça :



echo '';

print_r($letab[1]);

echo '

';
0
Rejoignez-nous