Re: sorting troubles

From: Date: Sat, 22 Apr 2006 10:09:58 +0000
Subject: Re: sorting troubles
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-234551@lists.php.net to get a copy of this message
hmm, should also see http://www.php.net/sort Peter Hoskin wrote: > See explode, http://www.php.net/explode > > $var = 'A20,B16,B17C14,C15,D13,D12'; > $array = explode(',',$var); > > foreach ($array as $key => $value) { > echo $value ."\n"; > } > > > William Stokes wrote: > >> Hello, >> >> Any idea how to sort this? >> >> I have a column in DB that contains this kind of data, >> A20,B16,B17C14,C15,D13,D12 etc. >> >> I would like to print this data to a page and sort it ascending by the >> letter an descending by the number. Can this be done? Like >> >> A20 >> B17 >> B16 >> C15 >> C14 >> D13 >> D12 >> >> Thanks >> -Will >> >> >> > >

« previous php.general (#234551) next »