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>




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>";





/*Output of the above program is:

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


lowercase : php programming



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.