I've a piece of code with outputs database results in a table. This is working fine but I want to have max 5 cols and start a new row after that. Would be great if someone could help me out. Many thanks in advance!
Code:
$opties.='<b>'.$option['name'].':</b><br /><table><tr>';
foreach ($option['option_value'] as $option_value) {
$opties.= '<td><img src="image/cache/'.$option_value['image'].'" /><br />'.$option_value['name'].'</td>';
}
$opties.='</tr></table>';
Comment