I'm using the following PHP code to echo the data from an array...
foreach($businessnames as $b)
{
$theurl = get_term_link($b, 'businessnames');
echo "<li style='width: 31%;'><a href=\"" . $theurl . $append . "\">". $b->name ."</a></li>";
}
I was using this to get the data into 3 equal columns but now I need to do 3 equal columns in the order from the array (as opposed to "left to right" like CSS floats cause). I imagine I need to count the total values in the array with PHP and then divide that, but I'm not sure what the code would be. I've been looking around but haven't found something that addresses this in particular.
How could I adapt my code here to put the array's data into 3 equal columns?
Thanks!