Received: from 211.39.138.92 (211.39.138.92) 
	at KTMAIL with ESMTP Hanmir
	by hanmir.com;Thu, 05 Feb 2004 03:23:14 +0900
X-MsgID: 1075918994153305746.46.hanmir
Message-ID: <1075918994153305746.46.hanmir@hanmir.com>
X-RECEIVED-IP: 216.92.131.4
Received: (qmail 52876 invoked by uid 1010); 4 Feb 2004 17:58:25 -0000
Mailing-List: contact php-general-help@lists.php.net; run by ezmlm
Precedence: bulk
list-help: <mailto:php-general-help@lists.php.net>
list-unsubscribe: <mailto:php-general-unsubscribe@lists.php.net>
list-post: <mailto:php-general@lists.php.net>
Delivered-To: mailing list php-general@lists.php.net
Received: (qmail 52858 invoked by uid 1010); 4 Feb 2004 17:58:25 -0000
Delivered-To: ezmlm-scan-php-general@lists.php.net
Delivered-To: ezmlm-php-general@lists.php.net
Reply-To: <php-general@lists.php.net>
From: "Burhan Khalid" <phplist@meidomus.com>
To: <jt.johnston@USherbrooke.ca>,
	<php-general@lists.php.net>
Date: Wed, 4 Feb 2004 20:58:24 +0300
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
In-Reply-To: <40213258.1EE08293@collegesherbrooke.qc.ca>
Thread-Index: AcPrR6+7hJtE4BCYRiaFxisUnoiKJAAALRKQ
Y-Message-Id: <E1AoRI3-00070A-5B@dell.kuwaitnet.net>
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - dell.kuwaitnet.net
X-AntiAbuse: Original Domain - lists.php.net
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - meidomus.com
Subject: RE: [PHP] extract(filename)

John Taylor-Johnston wrote:
> In Borland Delphi, I can extract a filename from the paramstr(0) and
> then exchange out the extension. 
> 
> ChangeFileExt(extractfilename(paramstr(0)), '.html');
> 
> Is there a way to extract the filename of
> "/home/www/calendars/february2004.html" 
> and swap its extension for .htm?
> 
> february2004.htm is pure html. In february.html I include a header
> and a footer and then ("february2004.htm"); 
> 
> I would like to have some automatic code to do this instead of
> hand-coding 48 files. 
> 
> Do-able? How? I know these variables (PHP Version 4.3.4) but don't
> know how to start? 

How about starting at the manual? What a novel concept that is!

http://www.php.net/manual/en/function.basename.php

-- 
Burhan Khalid
phplist[at]meidomus[dot]com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

