Program Discussion :: Strings
Home > Programs > Strings

8. Write a program to Convert a String to Camel Case.
Hint: In camel case, we capitalise the first letter of each word.

Answer:

<!DOCTYPE html>
<html>
<body>

<?php 
function Camel() {
    
// input string
    
$arr ="what is your name";                                         
    echo  
"Input string is :" $arr."<br/>";
    
// function to convert in Camel notation
    
$camel =ucwords ($arr)  ;                                           
    
// printing string in Camel Notation 
    
echo $camel;                                                               
}
 
// function calling
Camel() ;                                                      
?>  

</body>
</html>

Asked In ::  IBM  

Post Your Answer Here:

Name *
Email

Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here: