Hello,
I have somewhat of a big problem. Here it goes.
I have a bunch of numbers like: A1, A2... and 1 thru 48. It goes from A1-A8 all the way up to H1-H8 and then 1-48. So there is like 112 entries in this array. I hope you are following me. Ok I am writing a select box:
<select name="switchport">
<option value=\"none\">--Choose--</option>
<option value=\"" . $switchArra[1] . "\">" . $switchArra[1] . "</option>
But i want a certain option selected based on this array number:
if($switchport == "1") { $switchp = $switchArray[$switchport]; }
but i have 112 of these. Is there an easier way of printing the following:
if($switchport == "1") { print "<option value=\"" . $switchArray[$switchport] . "\">" . $switchArray[$switchport] . "</option>\n"; }
if($switchport == "2") { print "<option value=\"" . $switchArray[$switchport] . "\">" . $switchArray[$switchport] . "</option>\n"; }
and so on 112 times??
Sorry if it sounds confusing, it was confusing to explain.
Bill