Location: PHPKode > projects > Top Music module > Top Music 3.0.7/html/modules/topMusic/admin/lib/com/sergids/topmusic/model/ArtistAdmin.php
<?php
class ArtistAdmin{
	function orderAZ($list) {
		if(is_array($list))
			sort($list);
		for($i=0;$i<count($list);$i++){
			$artistO=$list[$i];
			$id=$artistO->id;
			$name=$artistO->name;
			$first=substr($name,0,1);
			$first=strtoupper($first);
			${"list".$first}[$id]=$name;
			$aLetters[$i]=$first;
		}
		//$aLetters=array_unique($aLetters);
		//sort($aLetters);
		$aAll[0]=$aLetters;
		for($i=0;$i<count($aLetters);$i++){
			$aAll[$aLetters[$i]]=${"list".$aLetters[$i]};
		}
		//ksort($listAZ);
		return $aAll;
	}
}
?>
Return current item: Top Music module