Hi, Are you talking about the Numbers of List items hold by Golden or silver or whatever...? is this yes, then you can easily do it. Just create two table Like: 1) Table_Cat ID CatName 1 Golden 2 Silver 2) Table_CatHolder ID CatID Name 1 1 Golden Ring and now select * from Tabel_CAt while($row=mysql_fetch_array($result)){ $CatUID=$row['ID']; select * from Table_CatHolder WHERE CatID='$CatUID'; $total=mysql_rows_count($sql); echo $row['Name']."(".$total.")"; Hope, you are talking about this.... You will have to do complete code ...... the above code is only concept. Thanks Suman www.raisuman.myplace.com } Regards & Thank You, Suman K. Rai Cell: +977 98040 25616 rai.suman@xxxxxxxxx | sumanrai1980@xxxxxxxxx www.raisuman.myplace.com --- On Thu, 2/5/09, Hari KT <kthari85@xxxxxxxxxxx> wrote: From: Hari KT <kthari85@xxxxxxxxxxx> Subject: Re: Numbers classifications To: php-objects@xxxxxxxxxxxxxxx Date: Thursday, February 5, 2009, 1:39 AM I dont get u completely . Golden: xxxxxx, xxxyyy, ... Silver: xyxyxy, xxyyxx, ... <?php $str = "xyxyxy"; $first = substr( $str , 0 , 1 ); //Get frst char $second = substr( $str , 1 , 1 ); //get 2nd char if( strncmp( $str , $first.$first. $first , 3 ) == 0 ) { //Golden() } else { //Silver() } ?> I have not tried it in my localhost . Plz do chk. And let me know is this what you need ? :) With Love Hari K T For more visit http://www.harikt. com/ http://ijust4u. blogspot. com --- On Thu, 5/2/09, Mohammad Al-Naji <mnaji.qx@gmail. com> wrote: From: Mohammad Al-Naji <mnaji.qx@gmail. com> Subject: Numbers classifications To: php-objects@ yahoogroups. com Date: Thursday, 5 February, 2009, 12:22 PM Hi, I need a function that classify a list of numbers into groups like (Silver, Golden, ...) according to pre-defined formulas like: Golden: xxxxxx, xxxyyy, ... Silver: xyxyxy, xxyyxx, ... Anybody can help in that? -- Kind Regards, Mohammad Al-Naji [Non-text portions of this message have been removed] Add more friends to your messenger and enjoy! Go to http://messenger. yahoo.com/ invite/ [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]