I have a sidebar. Till now I am calling this as
dynamic_sidebar( 'home-left-widget-area' );
and this shows data in
<li>. But I need data in
How to store values in array so I can use
You can't save that data to an array without writing your own function to process the widgets and using output buffering where the widgets themselves
Sidebars are not meant to do what you want to do and even if you got it working your markup would be broken since you would be shoving whole widgets into a
That is something like what you will get.
What you are trying to do is complicated and wrong and browsers may not parse the markup correctly enough to do what you expect it to do anyway. I'd bet they would not. Complicated chunks of block level content are not supposed to be inside a select menu.
You do not need markup in a select menu to have a responsive theme. You need to rethink what you are doing.