Hello,
I tried to get an array from select field
This select field consists of cites to select (multi select with ajax enabled )
this code below was test which gets all fields. But i need an array with just the selected cities.
$field_key = "field_5a18ee424e883";
$field = get_field_object($field_key);
if( $field )
{
echo '<select name="' . $field['key'] . '">';
foreach( $field['choices'] as $k => $v )
{
echo '<option value="' . $k . '">' . $v . '</option>';
}
echo '</select>';
}
Thank You