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

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

 



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 <jochem@xxxxxxxxxxxxx> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux