HTML
<ul><h2>More useful stuff...</h2>
<li><a href="#">category 1</a></li>
<li><a href="#">category 2</a></li>
<li><a href="#">category 3</a></li>
<li><a href="#">category 4</a></li>
<li><a href="#">category 5</a></li>
<li><a href="#">category 6</a></li>
<li><a href="#">category 7</a></li>
<li><a href="#">category 8</a></li>
<li><a href="#">category 9</a></li>
<li><a href="#">category 10</a></li>
<li><a href="#">category 11</a></li>
<li><a href="#">category 12</a></li>
<li><a href="#">category 13</a></li>
<li><a href="#">category 14</a></li>
<li><a href="#">category 15</a></li>
<li><a href="#">category 16</a></li>
<li><a href="#">category 17</a></li>
<li><a href="#">category 18</a></li>
<li><a href="#">category 19</a></li>
<li><a href="#">category 20</a></li>
<li><a href="#">category 21</a></li>
<li><a href="#">category 22</a></li>
<li><a href="#">category 23</a></li>
<li><a href="#">category 24</a></li>
</ul>
I got a list here, My question is how could I automatically divide that list into 2 or 3 columns either using php or jquery
I dont know how to use the for loop in php
Try this jQuery plugin called Columnizer
Just put all of that code in to a block like a
<div id="list">and use this function to columnize all the content