I have an *.inc with html, a rather long list of <options>. I want to clean this up
some.
I'm going to declare $FieldName and $ToBeSelected before I call
include("options.inc"). I also want to select one of the <options> in advance.
The problem is ... this is beginning to look like a function, which I will declare 10
times like a function. How can I clean up/streamline this code?
<?php
$ToBeSelected "<OPTION value=\"ST\" selected>ST</OPTION>";
$FieldName = "Field1";
include("options.inc");
?>
------snip "options.inc"------
<SELECT NAME="<?php echo"$FieldName"; ?>">
<OPTION value="">Choose One</OPTION>
<?php echo $ToBeSelected; ?>
<OPTION value="AU">AU</OPTION>
<OPTION value="ST">ST</OPTION>
<OPTION value="BT">BT</OPTION>
...18 options...
</SELECT>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php