NYCPHP Meetup

NYPHP.org

[nycphp-talk] dynamic jump menu from flatfile

Daniel Krook danielk at us.ibm.com
Mon May 3 10:18:38 EDT 2004





Sorry, Monday morning.  My example should have looked like this:


<?php

function drawNav () {
      // items.txt would look like this:
      // http://ibm.com/|IBM.com
      // http://google.com/|Google
      $lines = file('items.txt');
      $html = '<select onchange="go(this);">';

      foreach ($lines as $line) {
            $items = explode('|', $line);
            $html .= sprintf('<option value="%s">%s</option>', $items[0],
$items[1]);
      }

      echo ($html . '</select>');
}





Daniel Krook, Application Developer
WW Web Production Services North 2, ibm.com
1133 Westchester Avenue, White Plains, NY 10604

Personal: http://info.krook.org/
Persona: http://w3.ibm.com/eworkplace/persona_bp_finder.jsp?CNUM=C-0M7P897





More information about the talk mailing list