Jump to content

Trying to cApitalize only the second letter in a sentence


cyborgeek

Recommended Posts

<?php
 
$str = "capitalize

 

";
 
$str_implode = str_split($str);
 
$caps = true;
foreach($str_implode as $key=>$letter){
    if($caps){
        $out = strtoupper($letter);
        if($out <> " ") //not a space character
            $caps = false;
  
 
echo $str;
 
?>
 

// I realize this is an error unsure if I need to array() or convert case ?? 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.