[RESOLVED] Classes and Arrays
Hey,
I have a class set up with some variables
PHP Code:
var $caption;
var $default;
var $xPos;
I create a new instance of this class and copy accross some POST variables which are in fact arrays.
PHP Code:
$newPrint->caption = $_POST['caption'];
$newPrint->default = $_POST['default'];
$newPrint->xpos = $_POST['xPos'];
I then try to use these arrays as bellow in a sql script
PHP Code:
'$this->caption[$i]',
'$this->default[$i]',
$this->xPos[$i],
However I get this output....
PHP Code:
VALUES ( 'Array[0]', 'Array[0]', [0], Array[0],
Which results in an error. Anyone spot anything obvious?