Yii Related Dropdown From A 2-D Array

I have a 2d array and I would like to create 2 dropdown. The 1st dropdown will consist of the 1st level of the array. The 2nd will get populated upon selection of the 1st with the selected childs.

I know this is a task for ajax, but since the array wont be much big, so I want to avoid a request.

use dependant dropdowns

check out this link


Thanks for the response. But I was looking to avoid the ajax request as the array wont be much long and I can load the array on page load.

then reload the page with the first selected value!!

ajax is the solution, or simple scripts… both are same!!