Please help me with this problem.
I've got a class with an array in it, and some data in the array.
I instantiate the class as myArray class, and pass it to a function, the function uses the array in the class as input for a mysql database. The problem is the sql wont input the data. I can insert into the database via sql local variables and local arrays and class variables but not class arrays? if i save the class array to a local variable and insert that into the sql then that works, but it wont go straight in? I imagine this has to do with passing the array by refrence rather than by value as i get "array[]" as the value in the database but i can't be sure.
pseudo code:
class arrayclass()
{
var options;
options[0]="foo";
}
Function insertData(myArray)
{
//THIS WORKS
echo myArray->options[0];
//BUT THIS DOESN'T
mysql_query("UPDATE OPTIONS SET bar='myArray->options[0]' WHERE EVER ");
}
myArray = new arrayClass();
insertdata(myArray);
Please help.