Todd Cary wrote:

I do the following:

  $eventList = array();
  $eventList[] = "Any";
  $dbh = db_open($host, $user, $password, $database);
  if($dbh) {
    $sthdl = db_get_event_data($dbh);
    while ($row = mysql_fetch_object($sthdl)) {
      $eventList[] = $row->EV_EVENT;
    }
  } else {
    $eventList[] = "* None found *";
  }
  asort( $eventList );

Now I want to put "Any" as the first item. What is the best way to do this? Often the sort puts it as an item down the list.

Todd

Take out the $eventList[] = "Any"; at the top and at the bottom:


array_unshift($eventList, 'Any');

--
paperCrane <Justin Patrin>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to