Posted By:
16 Mar, 2014 2:55 am PDT

String Handling in PHP

How to handle Strings in PHP?

 

String in PHP can be handled properly.We can convert String from upper case to lower case and vice-versa.

//To convert the String to Uppercase and lowercase

 

<!DOCTYPE html>

<html>

<body>

<?php

echo "Converting lower case to upper case and vice versa","<br>","php  programming is converted to:","<br>","<br>";

$str = "php  programming";

$convert = strtoupper($str);

$con = strtolower($convert);

echo "uppercase : ","<b>".$convert."</b>","<br>";

echo "lowercase : ","<b>".$con."</b>";

?>

</body>

</html>

 

/*Output of the above program is:

Converting lower case to upper case and vice versa php programming is converted to:

uppercase : PHP PROGRAMMING

lowercase : php programming

*/

Attachment:None


This shows how to handle string.This explains you to  convert uppercase string to lowercase and vice-versa using String function.

Attachment: string.php
Was it useful?  




Please login to reply to this problem.



Related Problems on Fixoncloud