Re: Numbers classifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote:
From: Mohammad Al-Naji <mnaji.qx@xxxxxxxxx>
Subject:  Numbers classifications
To: php-objects@xxxxxxxxxxxxxxx
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]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux