salut

je ne sais pas comment retourner une fonction de tableau. quelqu'un qui peut m'aider svp. voici le 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
class connection
{
public function getListFiel($table,$nbreChamp)
	{		
		$res = mysql_query("select * from " . $table);		
		for($i=0;$i<$nbreChamp;$i++)
		{			
			$tabChamp[]=mysql_field_name($res,$i);	
		}		
		return $tabChamp[];
 
	}
}	
 
 
$connect=new connection();
$tableau = $connect->getListFiel("table",8);

comment imprimer les info qui est dans la fonction getListFiel("table",8)

merci