PHP Select from Mysql into onclick and echo an array
<p>I'm trying to get my form to select its choices from a predefined mysql array (field_5806395ec1f8d)</p>

<p>Somehow I keep getting nasty <code>T_STRING</code> errors, but I can't figure out why.</p>

<p>(It's all wrapped in an <code>endcontent</code> variable btw)</p>

<pre><code>&lt;div class="xxx"&gt;
  &lt;input type="text" id="select3" class="jsselect" placeholder="choose" value="'.$_POST[radio3].'"&gt;

  &lt;div class="popup_select" id="select_div3"&gt; $field = get_field_object("field_5806395ec1f8d");
    $i=2;
    foreach($field[choices] as $select){
    echo '
        &lt;input id="select3_'.$i.'" onclick="radio(\''.$select.'\',3);this.form.submit();" name="radio3" value="'.$select.'" type="radio" '.($_POST[radio3] == $select ? "checked" : "").'&gt;
        &lt;label for="select3_'.$i.'"&gt;'.$select.'&lt;/label&gt;
        &lt;br&gt;
    ';
    $i++;
    } 
  &lt;/div&gt;

&lt;/div&gt;
</code></pre>

<p>Any help will be gladly appreciated.
Thank you.</p>