I am displaying list of category from MySQL database and while displaying those category I am trying to assign the value of each item from **2 to 9**. So when all `(8 row in total)` category displayed, the value should start from **2, 3, 4, 5 .... 9**.

Here is what I did in my coding :

```
$select_cat = "SELECT * FROM tblcat";
$result_cat = $conn->query($select_cat);
if ($result_cat->num_rows > 0)
{
    while($row_disp_cat = mysqli_fetch_assoc($result_cat))
    {
        for ($id = 2; $id <=9; $id++)
        {
            echo '<li><a id="'.$id.'">'.$row_disp_cat['catName'].'</a></li>';
        }
    }
}

```

With above code I am getting the value looping `8 times` of `2-9`