-1

While printing column and row from an array it's showing blank not exporting any data

$inn_table = "";

if ($result['qualification']['dd1'] != "") {
  $dd1 = explode(",", $result['qualification']['dd1']);
}

if ($result['qualification']['dd2'] != "") {
  $dd2 = explode(",", $result['qualification']['dd2']);
}

for ($i = 0; $i < count($labels); $i++) {

  if ($result['qualification']['dd1'] != "") {
    echo '<pre>First';
    print_r($dd1); ** //echo arrays**
    for ($j = 0; $j < count($dd1); $j++) {
      $temp = explode(">", $dd1[$j]);

      if ($temp[0] == $labels[$i]) {
        $name = explode(">", $dd1[$j]);
        echo '<pre>First ';
        print_r($name[1]); ** //echo names**
      }
    }
  }
}

Here is my Array structure

Array

and Here names which i am trying to export from Array

Names

So i only trying to export names from that array please help

Manish Balodia
  • 1,863
  • 2
  • 23
  • 37
nomann11
  • 11
  • 1

1 Answers1

0
foreach($labels as $ind => $label) {

    $index = $ind + 2;

    $letter = range('A', 'Z')[$ind2];
    $val = explode('>', $data);

    $objPHPExcel->getActiveSheet()->setCellValue($letter . $index, $val[1]);

}
Mark
  • 1,852
  • 3
  • 18
  • 31