Re: Sub Strings

From: Date: Mon, 11 Dec 2000 19:46:47 +0000
Subject: Re: Sub Strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29741@lists.php.net to get a copy of this message
On Mon, 11 Dec 2000, shawn wrote: > I have a string in the following format: "-rw-rw-r-- 1 orther site2 > 19902 Aug 28 16:31 feedbackform.php3" > > I want to get the name only which is the last text of the string. Is > there anyway to count the 8 spaces (i.e. " ") to the right and get > everything after that? > Try: explode(" ", $string, 9)[8] or: substr(strrchr($string, " "), 1) -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.general (#29741) next »