you can pass an unlimited number of variable through the array() constructor.
as: data_interface(array($table1, $table2, $table3)) you can use an Array manipulation functions for that order too. good luck, "Mathieu Dumoulin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok, here i made a function that can accept an unknown number of params. > > In fact, it's a data interface for a mysql database, when i call the > object's constructor it is in possibility to pass any number of table names > from 1 to x. Now i got this other class called a data interfacer which sends > a certain number of tables to the data interface constructor. I tried doing: > > $interface = new data_interface($table1, eval("$table2, $table3, $table4")); > $interface = eval("new data_interface($table1, $table2, $table3, $table4)"); > > and various other tries. The thing is i can't know how many tables can be > transfered from the data interfacer to the data_interface. So i could make a > if..elseif...elseif until i reach something like 10 tables but still, it's > not a good practice, i'm sure there is a way to emulate real parameters when > they are needed and skip them in the call if you don't have them. > > Can anybody help me out? > > InsaneCoder > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php