Problem in generating subtable


(Jiten007) #1

Hi,

I am trying to generate a subdatatable (inside a row of another datatable).

$logo=array(‘logo’ => ‘/Referers/images/searchEngines/hotbox.png’);
$nest=array(array(‘label’=>‘Piwik33’,‘myvalue1’=>33,‘myvalue2’=>33,‘myvalue3’=>33),array());

  	$a1=array(array('label' => 'Piwik11','myvalue1' => 42,'myvalue2'=>32,'myvalue3'=>45),$logo,$nest);
	$a2=array(array('label' => 'Piwik22','myvalue1' => 50,'myvalue2'=>45,'myvalue3'=>75));		
  		  	
  	$row1=new Piwik_DataTable_Row($a1);
  	$dt->addRow($row1);	
  	$row2=new Piwik_DataTable_Row($a2);	
  	//$row2->addSubtable($sub);  		  	  
  	$dt->addRow($row2);	

The subtable never shows up,Can anyone suggest me to resolve this?
Even this also doesn’t work : $row2->addSubtable($sub); where $sub is another datatable.

Help me in resolving this. Thanks.