I want to make it so that every 3 columns it forms a new row. I am lost and can't figure out how to do this even after reading other posts.So I'd want it to be like
icon icon icon
icon icon icon
icon icon icon
etc....
foreach($sMenu as $row) {
$sClass = ($row['id'] == $aPage['id']) ? ' class="ui-btn-active ui-btn-custom"' : ' class="ui-btn-custom"';
$sIcon = ($row['icon'] != '') ? ' data-icon="' . $row['icon'] . '"' : '';
$sSiteRoot = get('site-root');
$row['url'] .= ($row['url'] == '') ? '' : '/';
$url = $sSiteRoot . $row['url'];
$url = str_replace('(', '%28', $url);
$url = str_replace(')', '%29', $url);
$url = str_replace("'", '%27', $url);
$sNavigation2 .= '<td><img src=". $sIcon .' . $url . '"></td>';
}
$i = 0). Then, just check to see if the number is equal to 2 (if ($i == 2)) then... just add your</tr><tr>break (or whatever you need...) and reset the$ivariable. Then, keep going through theforeachloop you have.