Snippets v2

Languages
My Snippets

Get Intelligent description from Filename Login or Register to Bookmark this snippet

Description PHP

This function strips the extension, and aims to produce a friendly filename that could be used for a description.

The Code Download
  1. <?php
  2. function GetIntelligentFilename($filename) {
  3.     return ucwords(trim(str_replace("_"," ",substr($filename, 0, strrpos($filename,'.')))));
  4. }
  5. ?>
Credits Contact JC

Added by JC on 12th November, 2007

Comments

There are no comments about this snippet.

Post Comment HTML is allowed

You must be registered and logged in to post a comment.

Login here to post a comment