Hello! Well I have this problem, I have an array and I want to pass all the values of this array in a form object ( a drop down list for example). I can't find how can I do this, I can only pass the values one by one, but the problem is that I don't know how many values I will have. Any suggestions? :?:
ok, problem solved with this:
$array = array('value1', 'value2', 'value3'); $html = '<select name="some_name">'; foreach ($array as $element) { $html .= '<option value="'.$element.'>'.$element.'</option>'; } $html .= '</select>';