How to uppercase the first letter in a sentence in php
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/182641/how-do-i-display-the-first-letter-as-uppercase">How do I display the first letter as uppercase?</a><br>
  <a href="http://stackoverflow.com/questions/5383471/php-capitalize-first-letter-of-first-word-in-a-sentence">PHP capitalize first letter of first word in a sentence</a>  </p>
</blockquote>



<p>I want to uppercase the first letter in a sentence and after a period. Can anyone suggest how to do?</p>

<p>For example, </p>

<pre><code>//I have the following in a language class.
"%s needs to identify areas of strength and 
weakness. %s sets goals for self-improvement."; 

// in a view
$contone=$this-&gt;lang-&gt;line($colstr);// e.g get the above string.
//$conttwo=substr($contone, 3);//skip "%s " but this doesnot work when there 
//are more than one %s
$conttwo=str_replace("%s ", "", $contone);// replace %s to none 
$contthree = ucfirst($conttwo); // this only uppercase the first one
</code></pre>

<p>I want the following output.</p>

<pre><code>Needs to identify areas of strength and 
weakness. Sets goals for self-improvement.
</code></pre>

<p>Thanks for your help.</p>
