j'ai 2 tableaux.
$test1=array('[email protected]','[email protected]','[email protected]','[email protected]','[email protected]','[email protected]');
$test2=array('[email protected]','[email protected]','[email protected]','[email protected]');
j'aimerai dédoublonner $test2 par rapport $test1 au final avoir $test2=array('[email protected]','[email protected]');
alors je fais:
$i=count($test1);
$j=count($test2);
$z=0;$w=0;
while($z<=$i){
if($test2[$z]==$test1[$w]) echo $test2[$z].'...'.$test1[$w].'<br />';
$w++;
}
$z++;
evidement ça me sort un truc chelou
et j'imagine qu'il faudait refaire une boucle sur $z pour arriver à faire ça :
$test2[0] teste sur $test1[0]
$test2[0] teste sur $test1[1]
...
$test2[1] teste sur $test1[0]
$test2[1] teste sur $test1[1] etc..
mais comme mes neurones sont congelés en ce moment par le froid sibérien j'ai besoin de l'aide d'entre vous ..
dankécheune my friends!