split data result with css

I don’t want to sound like a spliting result junkie, but i found another solution for spliting result when i went through a wordpress template, listing result into 2 columns but not using modulo operator, just good old css

Start with cascading style sheet that will split our result into 2 column

<style>
.clear{ clear: both; }
.content_wrap
{
padding: 0 3px;width: 360px;font-family: sans-serif;
}

#categories_menu
{
font-weight: bold;
}

#categories_menu ul
{
float: left;
margin: 0;
padding: 0;
list-style: none;
}

#categories_menu li
{
border-bottom: 1px solid #d8eded;
float: left;
margin: 0;
padding: 7px 2px 7px 5px;
width: 170px;
}

#categories_menu a:link, #categories_menu a:visited
{
color: #0084d4;font-size:8pt;
text-decoration: none;
}

#categories_menu a:hover
{
font-size:8pt;
color: #ff0099;
text-decoration: none;
}
</style>

I use a serial of string as example, the string of course can be a sql result

<?
$str = ‘Villa,Teresa,US$120,Villa,Teresa,Bali,situated,beach,Canggu,Village,stunning,landscape’;
$expThree=explode(‘,’,$str);
$n = count( $expThree );
$m = 0;
?>

Writing result into column

<div class=”content_wrap”>
<div id=”categories_menu”>
<ul>
<?
for ($m=0; $m < $n; $m++)
{ ?><li><a href=”#”><?php echo $expThree[$m];?></a></li><? } ?> </ul>
<div class=”clear”></div>
</div>
</div>