Jump to content

Problems with Arrays!


Emmash

Recommended Posts

I just want to find a way to write the content of the variable

$liste_tableaux_couleur

in my function

array_intersect()

to have something like

array_intersect($table1,$table2,$table3...)

 

... all the names of tables are in my variable

$liste_tableaux_couleur

but I can't do

array_intersect($liste_tableaux_couleur)

, because I get the error that the function needs 2 parameters, is there a way to write the values of my variable directly into the parenthesis of the function????

 

$liste_tableaux_couleur

is not an array but a string variable that contains, by example, differents names of tables like

"$table1,$table2,$table3" 

 

 

The variable

$liste_tableaux_couleur

is in a loop because it can contains 2 table or 3 or 4...etc... depending on what the users chose.

 

Thanks a lot,

 

Marie-Hélène

Link to comment
https://forums.phpfreaks.com/topic/127591-problems-with-arrays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.