[thelist] PHP string manipulation

Frijo Franco frijo.franco at megasoft.com
Thu Jun 26 23:14:22 CDT 2003


HI,

	$path="Directory_One/Directory_Two/FileName1.zip";

	echo $path["dirname"]."/";
hope this will help

thanks and regards
frijo

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Mark Joslyn
Sent: Friday, June 27, 2003 4:29 AM
To: Evolt (E-mail)
Subject: [thelist] PHP string manipulation


I am having the hardest time writing a string manipulation that will take
the following:

Directory_One/Directory_Two/FileName1.zip

or

Directory_One/Filename1.zip

(the paths can have from 1 to 3 directories separated by "/")

I need everything left of the last "/" returned as a string including the
last "/" (essentially just removing the filename).

I have looked at substr, strchr, etc.. I cannot seem to make it return what
I want. Any ideas???

Thanks,

markJ

--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

Evolt.org conference in London, July 25-27 2003.  Register today at
http://evolt.org.uk

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
-------------- next part --------------
This mail has been scanned for viruses by InterScan Viruswall.

Information contained and transmitted by this E-MAIL is proprietary to Megasoft Ltd and is intended for use only by the individual or entity to which it is addressed and may contain information that is privileged, confidential or exempt from disclosure under applicable law.If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform us of the erroneous delivery by return e-mail to mailadmin at megasoft.com.



More information about the thelist mailing list