2D Array Sorting, Help !
Posted: Fri Mar 27, 2009 8:22 pm
Hi everyone. I'm not getting expected result using usort.
Can you help please ?
fields : name, address, state, due amount. These are loaded from a flatfile text file.
$data[1][0]="Mr. Jack"
$data[1][1]="122 Jackson Ville"
$data[1][2]="Florida"
$data[1][3]="$900.50"
$data[2][0]="Mr. Brown"
$data[2][1]="122 Jackson Ville"
$data[2][2]="NY"
$data[2][3]="$600.50"
$data[3][0]="Mrs Smith"
$data[3][1]="143 Clorado"
$data[3][2]="NC"
$data[3][3]="$450.44"
usort($data[][3]); // this doesn't help me.
thanks guys. PHP has so many functions, but I'm lost. What should I do ? Please help !
Can you help please ?
fields : name, address, state, due amount. These are loaded from a flatfile text file.
$data[1][0]="Mr. Jack"
$data[1][1]="122 Jackson Ville"
$data[1][2]="Florida"
$data[1][3]="$900.50"
$data[2][0]="Mr. Brown"
$data[2][1]="122 Jackson Ville"
$data[2][2]="NY"
$data[2][3]="$600.50"
$data[3][0]="Mrs Smith"
$data[3][1]="143 Clorado"
$data[3][2]="NC"
$data[3][3]="$450.44"
usort($data[][3]); // this doesn't help me.
thanks guys. PHP has so many functions, but I'm lost. What should I do ? Please help !