View Single Post
Old 01-15-2008, 05:57 AM  
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by rowan View Post
Code:
$db = file("filename.txt");
$i = 0;
while (isset($db[$i])) {
  $blah = explode(" ", strtolower(trim($db[$i])));
  $j = 0;
  while (isset($blah[$j])) {
    $t = $blah[$j];
    $t[0] = strtoupper($t[0]);
    $blah[$j] = $t;
    $j++;
  }
  echo implode(" ", $blah) . "\n";
  $i++;
}
It's late, it's messy, but it should work
This worked but it puts it all on the same line. I am a donkey so I don't know how to create a new line in php for this script. Tried <br> and another \n but nothing
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote