issue with array

Hi There.

I’m trying to grab data from an array but having a lil issue…

I am trying to use the following:

[php]
$model = array();

Foreach($rowIterator as $row){
$rowIndex = $row->getRowIndex ();
$model[$rowIndex] = array('C'=>'');

$cell = $sheet->getCell('C' . $rowIndex);
$model[$rowIndex]['C'] = $cell->getCalculatedValue();

}
$test = $model[34];

echo $test;
[/php]

But that just echos array.

but if i use print_r($model[34]);

it echos

[C] => 90R-N00WR1300T

sorry to be exact print_r($model[34]);

Prints: Array ( [C] => X73SD-TY062V )

You have a multidimensional array, so you’re going to need a key for each array, ie: $test = $model[34][‘C’];

Sponsor our Newsletter | Privacy Policy | Terms of Service