Re: [PHP] chop x amount of characters from the begining of a string

2006-05-03 Thread Richard Lynch
On Tue, May 2, 2006 3:44 pm, Wolf wrote:
 Someone has way too much time on his hands...  :)

If they REALLY had too much time on their hands, they'd have rtfm and
used mt_rand() instead. :-)

 Rory Browne wrote:
 function chop_two_or_3_characters_from_front_of_string($str){
  $cut = rand(2, 3);
  return substr($str, $cut);
 }

 On 5/2/06, Jochem Maas [EMAIL PROTECTED] wrote:

 Brad Bonkoski wrote:
  Perhaps this will work..
  http://www.php.net/manual/en/function.substr.php

 it's a long shot brad ;-)

 
 
  Ross wrote:
 
  I have a word say 'example' I want to chop of two or 3 chacters
 from
  the front to leave 'ample' or 'mple'. Is there a php function to
 do
 this?
 
 
  Ross
 
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] chop x amount of characters from the begining of a string

2006-05-03 Thread Jochem Maas

Richard Lynch wrote:

On Tue, May 2, 2006 3:44 pm, Wolf wrote:


Someone has way too much time on his hands...  :)



If they REALLY had too much time on their hands, they'd have rtfm and
used mt_rand() instead. :-)


muppet-comment
nah - if you really too much time you would have mimplemented some kind
of interface that takes batch input from a cheap-ass laborer on the
other side of the planet who sits there flipping a british fifty pence coin
aqnd logging the result. (everyone knows 50p's are the most statically
fair as far as coins are concerned).
/muppet-comment

:-P





Rory Browne wrote:


function chop_two_or_3_characters_from_front_of_string($str){
$cut = rand(2, 3);
return substr($str, $cut);
}

On 5/2/06, Jochem Maas [EMAIL PROTECTED] wrote:


Brad Bonkoski wrote:


Perhaps this will work..
http://www.php.net/manual/en/function.substr.php


it's a long shot brad ;-)




Ross wrote:



I have a word say 'example' I want to chop of two or 3 chacters


from


the front to leave 'ample' or 'mple'. Is there a php function to


do
this?



Ross





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php








--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] chop x amount of characters from the begining of a string

2006-05-02 Thread Ross

I have a word say 'example' I want to chop of two or 3 chacters from the 
front to leave 'ample' or 'mple'. Is there a php function to do this?


Ross 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] chop x amount of characters from the begining of a string

2006-05-02 Thread Brad Bonkoski

Perhaps this will work..
http://www.php.net/manual/en/function.substr.php


Ross wrote:

I have a word say 'example' I want to chop of two or 3 chacters from the 
front to leave 'ample' or 'mple'. Is there a php function to do this?



Ross 

 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] chop x amount of characters from the begining of a string

2006-05-02 Thread Jochem Maas

Brad Bonkoski wrote:

Perhaps this will work..
http://www.php.net/manual/en/function.substr.php


it's a long shot brad ;-)




Ross wrote:

I have a word say 'example' I want to chop of two or 3 chacters from 
the front to leave 'ample' or 'mple'. Is there a php function to do this?



Ross
 





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] chop x amount of characters from the begining of a string

2006-05-02 Thread Rory Browne

function chop_two_or_3_characters_from_front_of_string($str){
 $cut = rand(2, 3);
 return substr($str, $cut);
}

On 5/2/06, Jochem Maas [EMAIL PROTECTED] wrote:


Brad Bonkoski wrote:
 Perhaps this will work..
 http://www.php.net/manual/en/function.substr.php

it's a long shot brad ;-)



 Ross wrote:

 I have a word say 'example' I want to chop of two or 3 chacters from
 the front to leave 'ample' or 'mple'. Is there a php function to do
this?


 Ross




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] chop x amount of characters from the begining of a string

2006-05-02 Thread Jochem Maas

Rory Browne wrote:

function chop_two_or_3_characters_from_front_of_string($str){
 $cut = rand(2, 3);
 return substr($str, $cut);
}


dang! if I hadn't seen it with my own eyes I wouldn't have
believed it :-



On 5/2/06, Jochem Maas [EMAIL PROTECTED] wrote:



Brad Bonkoski wrote:
 Perhaps this will work..
 http://www.php.net/manual/en/function.substr.php

it's a long shot brad ;-)



 Ross wrote:

 I have a word say 'example' I want to chop of two or 3 chacters from
 the front to leave 'ample' or 'mple'. Is there a php function to do
this?


 Ross




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] chop x amount of characters from the begining of a string

2006-05-02 Thread Wolf
Someone has way too much time on his hands...  :)

Rory Browne wrote:
 function chop_two_or_3_characters_from_front_of_string($str){
  $cut = rand(2, 3);
  return substr($str, $cut);
 }
 
 On 5/2/06, Jochem Maas [EMAIL PROTECTED] wrote:

 Brad Bonkoski wrote:
  Perhaps this will work..
  http://www.php.net/manual/en/function.substr.php

 it's a long shot brad ;-)

 
 
  Ross wrote:
 
  I have a word say 'example' I want to chop of two or 3 chacters from
  the front to leave 'ample' or 'mple'. Is there a php function to do
 this?
 
 
  Ross
 
 
 

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php