hi Lee,
you can take this
Create a file with this content and name it to some extension your server will process php files.
PHP Code:
<?php
$tmpArr = array();
$keywordFile = "kw.txt"; //name of the file with your words
$words = file ($keywordFile); //read file into an array
foreach ($words as $word) //loop on that array
{
$tmpArr[] = ucwords(trim($word)); //left&right trim non printable chars then capitalize each word. The $tmpArr grows dynamically
}
foreach ($tmpArr as $ucWord) //loop and output
{
echo $ucWord."\n";
}
?>
You will then see some output where every word is capitalized.
This was the input in my kw.txt
hello world
hello lee
hello all others on gWW
output
Hello World
Hello Lee
Hello All Others On GWW
DEVELISH
Bookmarks