{"id":5166337,"date":"2014-08-06T21:30:48","date_gmt":"2014-08-06T21:30:48","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/populating-select-option-type\/"},"modified":"2016-08-21T23:59:43","modified_gmt":"2016-08-21T23:59:43","slug":"populating-select-option-type","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/populating-select-option-type\/","title":{"rendered":"Populating select option type"},"content":{"rendered":"<p>Hi,<\/p>\n<p>Great plugin.<\/p>\n<p>I was wondering if there was a possible way to populate the contents of the select options with titles that are stored in an array. I&#8217;ve tried multiple variations and seem to be having issues<\/p>\n<p>Some pointers would be very much appreciated. Would I be able to do something like this?<\/p>\n<pre><code>&#039;choices&#039;     =&gt; array(\n          array(\n            &#039;value&#039;       =&gt; &#039;test&#039;,\n            &#039;label&#039;       =&gt; echo $sliders[0][name];,\n            &#039;src&#039;         =&gt; &#039;&#039;\n          ),<\/code><\/pre>\n<p>https:\/\/wordpress.org\/plugins\/option-tree\/<\/p>\n","protected":false},"template":"","class_list":["post-5166337","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5166337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5166337\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5166337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}