Know what I found that works most reliably though?
$filenameExploded = explode(".", $filename);
that way, if I have a file like this:
filename.todaysdate.todaystime.extension I don't end up with the
extension being: .todaysdate.todaystime.extension :) Unless I was
using the substr() command wrong.
On Jun 19, 2008, at 1:53 PM, Philip Thompson wrote:
Does that get a different result than mine?
~Phil
On Jun 19, 2008, at 10:44 AM, Daniel Brown wrote:
Try this:
<?php
$filename = 'this_example.php.file.backup.phps';
echo substr($filename,(strrpos($filename,'.') +
1),strlen($filename))."\n";
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@xxxxxxxxxx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php