hello,
if am using an arrays in my code, i modify my form fields(text box, check box) like this,
$cnt = count($HTTP_POST_VARS['id']);
for($cntr=0;$cntr<$cnt;$cntr++) {
<input type="text" name="ac[<?=$counter?>]" value="<?=$ac?>">
if (!$HTTP_POST_VARS['attach'][$cntr]) $attach=0; else $attach=1;
<input type="checkbox" name="is_enrolled[<?=$counter?>]" value="1"<? if ($isenrolled==1)echo "checked";?>>
BUT, how is with option box.
If it is like this for example,
<SELECT
size=1 name=brand>
<OPTION value ="0"<?php
if($brand==0){
echo 'selected';
}?>>NIKE</OPTION>
<OPTION value ="1"<?php
if($brand==1){
echo 'selected';
}?>>ADDIDAS</OPTION></SELECT>
Now, my question is , how can i modify the above option code with respect to an array.
could some body pls make the changes and present it to me.
many thanks