<br><br><p><DEFANGED_div><DEFANGED_span class="gmail_quote">On 9/25/07, <b class="gmail_sendername">Topher</b> &lt;<a href="mailto:topher@wcsg.org">topher@wcsg.org</a>&gt; wrote:</DEFANGED_span><blockquote class="gmail_quote" DEFANGED_style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; A more dynamic approach might be<br>&gt; &lt;?<br>&gt;<br>&gt; $sql=&quot;SELECT st_abrv FROM schema.table-with-st_abrv ORDER BY st_abrv;&quot;;<br>&gt;<br>&gt; So I ask, which would you prefer?<br><br>I&#39;d do something similar to three for something like states.&nbsp;&nbsp;However,
<br>also for something like states I&#39;d get all the states into an array<br>somewhow, whether it be by manually creating it, or generating it with<br>your sql call.</blockquote><p><DEFANGED_div><br>If I were to put all the values of the states into an array in an included file
<br><br>$array=array(MI,{...});<br><br>&lt;?<br>include &quot;file-with-variables&quot;;<br><br>print (&quot;&lt;select&gt;&quot;);<br><br>foreach ($array as $value) { // $array is defined in &quot;file-with-variables&quot;
<br><br>&nbsp; print (&lt;option value=$value&gt;$value&lt;/option&gt;);<br><br>}<br><br>print (&quot;&lt;/select&gt;&quot;);<br><br>Where are the elements of the array stored, are they held in the servers memory, or the clients?
<br><br>So if 50 clients connect, will each store their own variables, or will the variables be stored 50 times in the server&#39;s memory?<br><br>If the latter is true, than it would make more sense to draw that array in then free the results, rather than include the array as a variable.
<br><br></p><DEFANGED_div><br><blockquote class="gmail_quote" DEFANGED_style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Once you have it in an array you can do all sorts of things like make a<br>
drop list, easily mark one option item &quot;selected&quot;, or whatever.<br><br>Topher<br>Manager of Internet Services<br>Cornerstone University Radio<br><br>------<br>perl -e &#39;print join &quot;&quot;, (map({chr(hex(/usr/bin/pine))} (shift =~ /\w{2}/g))),&quot;\n&quot;&#39; \
<br>4920776973682049206B6E6577204865782E00<br>_______________________________________________<br>grlug mailing list<br><a href="mailto:grlug@grlug.org">grlug@grlug.org</a><br><a href="http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug">
http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug</a><br></blockquote></p><DEFANGED_div><br><br clear="all"><br>-- <br>In vino veritas.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[In wine there is truth.]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- Pliny