On Feb 17, 2008 5:37 PM, nihilism machine <[EMAIL PROTECTED]> wrote:
> i am using this code to get the extension of a filename:
>
> $extension = strtolower(strrchr($fileName,"."));
>
> how can i get the text BEFORE the . (period)

    You can STFW and RTFM.  This list should never be your first place
to ask simple questions.

    In any case....

<?
$split = explode('.',strtolower($fileName));
$name = $split[0];
$ext = $split[1];
?>

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to