Oliver Witt wrote: > > Hi, > I have a problem that I don't know how to solve within php. > I have the variable $x = "How are you today" and the variable $y. Now, I > want the variable to be $y = "are you today" or $y = "you today". How do > I do that?
$y = ereg_replace( '^[[:space:]]*[[:alpha:]]+[[:space:]]+', '', $x ); Unless you had more exotice needs. There may even be a word chop function since I didn't bother to look :) Cheers, Rob. -- .-----------------. | Robert Cummings | :-----------------`----------------------------. | Webdeployer - Chief PHP and Java Programmer | :----------------------------------------------: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :----------------------------------------------: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `----------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php