Please help me to view in PHP (I’m using the CodeIgniter framwork) something like what’s shown in image 2.
From the database I select:
- Categ 1 -> Item 1
- Categ 1 -? Item 2
- ……
- Categ 2 -? Item 1
- Categ x -> Item x
One Item can have many Categ.
<div>
<ul>
<li>
<div class="programe-tv_link">
<p>Categ 1</p>
<dd> <a href="">>> Item 1</a></dd>
<dd> <a href="">>> Item 2</a></dd>
<dd> <a href="">>> Item 3</a></dd>
<dd> <a href="">>> Item 4</a></dd>
<dd> <a href="">>> Item 5</a></dd>
</div>
<div class="programe-tv_link">
<p>Categ 2</p>
<dd> <a href="">>> Item 1</a></dd>
<dd> <a href="">>> Item 6</a></dd>
<dd> <a href="">>> Item 7</a></dd>
<dd> <a href="">>> Item 8</a></dd>
<dd> <a href="">>> Item 9</a></dd>
<dd> <a href="">>> Item 2</a></dd>
</div>
</li>
<li>
<div class="programe-tv_link">
<p>Categ 5</p>
<dd> <a href="">>> Item 1</a></dd>
<dd> <a href="">>> Item 2</a></dd>
<dd> <a href="">>> Item 3</a></dd>
</div>
<div class="programe-tv_link">
<p>Categ 4</p>
<dd> <a href="">>> Item 1</a></dd>
</div>
</li>
</ul>
</div>
I attach image with illustration. I make view like image 1 where all is selected good only in one <li> tag; I need something like IMAGE 2.

My final solution is.