At first glance, it seems that you just need a simple table to implement a structure that allows you to create a nested array of category structure. Any category c parent_id == 0is optgroup, and then you will list each subcategory as optioninside each parent optgroup.
category_id | parent_id | category_name
1 | 0 | About us
2 | 1 | About us
3 | 0 | Products
4 | 3 | foo
5 | 3 | oof
6 | 0 | Support
7 | 6 | Support
This will display as:
<form method="post" action="postArticle.php">
<p>
<select name="selectedOption">
<optgroup label="About us">
<option value="2">About us</option>
</optgroup>
<optgroup label="Products">
<option value="4">Foo</option>
<option value="5">Oof</option>
</optgroup>
<optgroup label="Support">
<option value="6">Support</option>
</optgroup>
</select>
</p>
, select , . , , (, , ). , ( ), , , , optgroup . , ( ) option , , , .