Hi,
I'm having a problem with array's functions
The problem is that array_intersect needs 2 parameters to work... I've
also tried with dynamic variables but I think I code the wrong thing 'cause it
didn't solve my problem... Is there any way to just write the content of
the variable $liste_tableaux _couleur in the function array_intersect ...
something that would execute the line like :
$tab_resultat_c ouleur=array_me rge(array_inter sect($tab_resul tat_couleur0,$t ab_resultat_cou leur1,$tab_resu ltat_couleur2)) ;
...
Thanks a lot!!!!
Marie-Hélène
I'm having a problem with array's functions
Code:
//Making the list of the differents arrays
if($cpt_couleur+1<count($_POST["couleur"])){
$liste_tableaux_couleur.=${"tab_resultat_couleur".$cpt_couleur}.",";
}
else{
$liste_tableaux_couleur.=${"tab_resultat_couleur".$cpt_couleur};
}
//Keeping only the numbers that are present in each table
if(count($_POST["couleur"])>1){
$tab_resultat_couleur=array_merge(array_intersect($liste_tableaux_couleur));
}
else{
$tab_resultat_couleur=$liste_tableaux_couleur;
}
also tried with dynamic variables but I think I code the wrong thing 'cause it
didn't solve my problem... Is there any way to just write the content of
the variable $liste_tableaux _couleur in the function array_intersect ...
something that would execute the line like :
$tab_resultat_c ouleur=array_me rge(array_inter sect($tab_resul tat_couleur0,$t ab_resultat_cou leur1,$tab_resu ltat_couleur2)) ;
...
Thanks a lot!!!!
Marie-Hélène
Comment