Einzelnen Beitrag anzeigen
Alt 03.09.2002, 16:31   #8
RaistlinMajere
Inventar
 
Registriert seit: 06.04.2001
Alter: 44
Beiträge: 2.343


Standard

Zitat:
Original geschrieben von käptn
Tja, selber ne Funktion bauen?

~
hab die while-schleife etwas abgeändert:

PHP-Code:

if($anzahl>0) {
  while(
$row mysql_fetch_object($abfrage)) {
    
$first[$index] = str_rot13($row->teil1);
    
$second[$index] = str_rot13($row->teil2);
 
    for(
$i=0$i<$index$i++) {
      if(
$first[$index] == $first[$i]) {
        
$first[$index] .= "";
      }
    }

    
$index++;
  }

das zusätzliche leerzeichen im zu sortierenden array fällt in der darstellung ja nicht weiter auf, sorgt aber dafür, daß die strings nicht gleich sind und somit beide bei der sortierung berücksichtigt werden.
____________________________________
"Life is like a box of rockets," said the Marine. "You never know what you´re gonna ret."
Then he pulled the trigger of his BFG9000.
RaistlinMajere ist offline   Mit Zitat antworten