Code: Select all
//1.
$a = array(
"field1" =>array("header" =>"x", "type"=>"label",...),
"field2" =>array("header" =>"y", "type"=>"label",...),
........);
Code: Select all
for( $i=0; $i<=$n; $i++)
{ $a[$i] = array("$b[$i]" =>array("header" => "$b[$i]",.........) ); }
// passing array as argumnet in function
$dgrid->setColumnsInViewMode($a);But all i get by this way, is the last column ($b[n]), i placed the call of the function inside the loop before "}" but i get the same. It seems that something i'm doing wrong, i'm stack on it. The last thing i tried is to write into array like the following
Code: Select all
$a = array( ";
Code: Select all
$a="abc"; $a.="def"; //prints abcdef*I 've already cheched SQL statements, all the other operations works fine, the only problem is on display the data.