Re: chop x amount of characters from the begining of a string
| From: | Richard Lynch | Date: | Wed, 03 May 2006 09:27:15 +0000 |
| Subject: | Re: chop x amount of characters from the begining of a string | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235344@lists.php.net to get a copy of this message | ||
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 <jochem@iamjochem.com> 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