Re: searching through a string

From: Date: Mon, 18 Sep 2006 14:40:59 +0000
Subject: Re: searching through a string
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-42366@lists.php.net to get a copy of this message
Ron Piggott (PHP) wrote:
If $file_name includes the path /path/to/file/file_name.pdf is there anyway of searching from the right hand side to the left and getting the file name out the $file_name variable? The file name starts the character following the last /
this should do it. $filename=preg_replace('/.*\//','',$filename); Kae

« previous php.db (#42366) next »