I have array like this:
Array (
[0] => Array(
[attribute_name] => Brand
[attribute_value] => Lee
)
[1] => Array(
[attribute_name] => Brand
[attribute_value] => Levis
)
[2] => Array(
[attribute_name] => Brand
[attribute_value] => Raymond
)
[3] => Array(
[attribute_name] => Fabric
[attribute_value] => Cotton
)
[4] => Array(
[attribute_name] => Fabric
[attribute_value] => Linen
)
)
I want to create two drop down from this array one is for Brand which should have three options and another one is for fabric which should have two option.
I can do simply by checking attribute_name is brand or fabric, but this is not static there can be anything instead of brand and fabric.
I've tried so many things but not worked. Please help me in doing this. Thanks in advance.