View Single Post
Old 10-07-2005, 08:15 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
PHP Code:
<?
$row_array 
= array();
$key_array = array();

$result mysql_query("select configname from configs");

while(
$row mysql_fetch_assoc($result)) {
    
    
// create an array of cofig names so you can
    // use the natsort later
    
$key_array[] = $row['configname'];
    
    
// create an array of the rows using the
    // config name as the key
    
$row_array[$row['configname']] = $row;
  
}

natsort($key_array);

foreach(
$key_array as $key) {

  
// now you can access the row
  // by using the $key var
  
  
$config $row_array[$key];
}

?>
__________________
Mike
sde is offline   Reply With Quote