I hope you understand: It is too long to include here so I'll give you an idea. file.B ----------------------- <?php $all_cats = "1, 2, 3"; function html_options($output, $values = NULL, $selected = NOT_NULL, $first_option_output = false) } return($html_output); } echo"<select name=\"cat\" size=\"1\">"; //-cats $cats = explode(',',$all_cats); //--values $cats_vals = explode(',',$all_cats); print html_options($cats, $cats_vals, $selected, "--Select one--"); echo"</SELECT>"; ?> ------------------------ file.A code: <?php $connect to db; $get result; $cat = $row["cat"]; $selected = "$cat"; ----------------------- include ("file.B"); ----------------------- done ?> >From here on I get the menu with --select one-- option first then 1, 2, 3, but it ignores the fact the I told it $selected = "$cat". I figure it has to do with including the function file instead of having the function inside of "A". How can I call file.B from different files and have it accept the variable $selected from such files? Thaks in advance: Gerry Figueroa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]