I want to make one column with three rows after that second and third column should be made. With this code, only one column is being created.

$i = 1;
foreach($array as $a => $v) {

    $table .= "<td style='font-weight: 600;width: 9%;'>$a</td><td style='width: 10%;'>$v</td>";
    //^           ^ double quotes for the variables
    if(($i+0) % 1 == 0)
        $table .= "</tr><tr>";


enter image description here

  • Hello @Anees, could you add screen shot, what you need ? – Pawan May 14 at 5:08
  • I want above two coloumns into four columns having 3 rows each. – Anees May 14 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.