Re: chop x amount of characters from the begining of a string
| From: | Jochem Maas | Date: | Tue, 02 May 2006 20:00:28 +0000 |
| Subject: | Re: chop x amount of characters from the begining of a string | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235293@lists.php.net to get a copy of this message | ||
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@iamjochem.com> wrote:Brad Bonkoski wrote:Perhaps this will work.. http://www.php.net/manual/en/function.substr.phpit's a long shot brad ;-)Ross wrote:this?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 doRoss-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php