PHP 5 + COM + Multidimensional Arrays

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm trying to make use of a certain method of a COM object that takes a
multidimensional array as its sole parameter.

Here's an example of the construction of said array:
$cA = array();
$cA[$adjNum][0] = new VARIANT($cDesc);Type Code
$cA[$adjNum][1] = new VARIANT($cLongDesc);Long Description
$cA[$adjNum][2] = new VARIANT('B');
$cA[$adjNum][3] = new VARIANT($cPrice);
$cA[$adjNum][4] = new VARIANT('D');
$cA[$adjNum][5] = new VARIANT($i);

$result = $awfulComObject->SetAdjustments(new VARIANT($cA), new

The method simply never works out. The COM object on the other end
always says 'Invalid data array'.

I've tried all varieties of messing around with this: casting the
variables in the array to variants (and not doing so), casting the
array itself to variant (and not doing so)... etc...

Does anyone have a better way of constructing a multidimensional array
that works with COM in PHP?

It's rumored that PHP 5 allows for the passing and reading of arrays to
and from COM objects ( )...

   "PHP 5 introduces the following new features to make your life
easier: *Access multi-dimensional arrays, or COM properties that
require multiple parameters using PHP array syntax. You can also write
or set properties using this technique. "

Any clues would be very gratefully appreciated -- thanks for reading!

Site Timeline