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
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php