I have a variable (array) and is returning the following:
array(13) {
["meta_id"]=> string(1) "2"
["post_id"]=> string(4) "2112"
["provider"]=> string(12) "Abc news"
["scheme"]=> string(3) "morning"
["viewers"]=> string(9) "2000"
["min_time"]=> string(3) "5"
["max_time"]=> string(3) "100"
["bways"]=> string(2) "10"
["release_date"]=> string(10) "04-05-2021"
["type"]=> string(11) "Video"
["variance"]=> string(4) "4k"
["tech"]=> string(9) "JS, HTML5"
["game_id"]=> string(5) "17640"
}
I get this data from the following query:
$meta = $wpdb->get_row( $wpdb->prepare("
SELECT * FROM ".$table_name." WHERE post_id = %d
", $post_id), ARRAY_A);
Currently, I am outputting the data in a table using something like:
$output .="<tr>";
$output .= sprintf('<td>%s</td><td>%s</td>', $attribute, $value);
$output .="</tr>";
and it is generating a table with 2 columns. I want to have a 4 columns instead like in the screenshot below:
Left column with a maximum of 5 rows and the remaining rows on the other column.

Based on this data array:
You can use the "Modulo" operator to get the data dispatched in a table with 4 columns like:
It should work as expected. you will get somethiing like: