$xr=0;$rvrt=0; while($xr<strlen($_POST[message])){ if($rvrt==1){$_POST[message]{$xr}=strtoupper($_POST[message]{$xr});} if($_POST[message]{$xr}=="."||$_POST[message]{$xr}==" "&&$rvrt==1){$rvrt=1;}else{$rvrt=0;} $xr++;}