<?php
$tab=array('chien','chat','chien','bibi','chien','cheval');
$x=count($tab);
$y=0;
$tabtab=array('');
for($cont=0;$cont<=$x;$cont+=1)
{
$var=$tab[$cont];
if(! in_array($var,$tabtab))
{
$tabtab[$y]=$tab[$cont];
$y+=1;
}
}
?>
Le but c'est d'eliminer les redondances , ainsi le tableau $tabtab doit contenir (chien + chat + bibi + cheval) , je sais pas ou est le problème o.O