####################################################
function to get the extenstion of a file
####################################################
function getFilenameExtension($fname){
$extension = explode('.', $fname);
//returning the extension of the files
return $extension[sizeof($extension)-1];
}
?>
#####################################################
Example
#####################################################
echo getFilenameExtension("filedbconection.inc.php");
?>
######################################################
Answer :php
######################################################
[Wednesday, November 21, 2007
|
0
comments
]
Popular Posts
- Elgg : The most popular open source social networking platform
- function to check whether the year given is a leap year or not
- some php questions
- Running a perl script from PHP
- php Questions
- Jquery based dynamic adding and removal of html elements.
- php questions
- Mysql query for searching a value, add weightage on the number of occurances and sort based on the weight-age
- How to select a specified number of values starting with each alphabets in mysql.
- function to validate the a given credit card based on the card type and based on luhns algorithm
0 comments
Post a Comment
Please put your comments here. your questions, your suggestions, also what went wrong with me.