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