etrader Posted December 28, 2010 Share Posted December 28, 2010 I display file names by this simple code echo $path_parts['filename'], "\n"; 1. How can I replace some characters, e.g. replacing "_" with " " (space)? 2. How can I capitalize the output words? Quote Link to comment Share on other sites More sharing options...
Zurev Posted December 28, 2010 Share Posted December 28, 2010 echo ucwords(str_replace("_", " ", $path_parts['filename'], "\n))"; http://www.php.net/manual/en/function.ucwords.php http://www.php.net/manual/en/function.str-replace.php Think I messed up the quotes, though you get the idea. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.