Re: newbie: string manipulation

From: Date: Wed, 24 Apr 2002 20:12:16 +0000
Subject: Re: newbie: string manipulation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94448@lists.php.net to get a copy of this message
Try this, not the most efficient way. $names = explode("/", /usr/blah/....); last_element = sizeof($names)-1; $name[last_element] = abigfile.... > I need code that grabs the file at the end of a file path. > I have this: > > /usr/blah/doh/yuck/wow/abigfile.html > > And would like to return this: > > abigfile.html > > Could somebody show me how to do this? > > Thank you! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -Pushkar S. Pradhan

« previous php.general (#94448) next »