I want to create dynamic rows and column with the help of PHP and HTML but I am little confused about this code so some help is definitely appreciated.
foreach ($data as $ord => $db_data)
{
if (($ord == count($data) - 1) && (count($data) % 2))
{
// Do a colspan of 2, as it is the last item (first clause)
// and there are an odd number of items (second clause)
}
}