Sunday 27 July 2014

Filled Under:

strtolower() and strtoupper() in php

strtolower() Function:

                                    strtolower() function that is use to convert the string in lowercase letters. It is also very useful function in php many example of this function in php one of them comparison the value from data base.

Syntax:

          strtolower(string);

Example:

<?php
$str=”HELLO PHP”;
echo strtolower($str);
?>

Output:

         hello php

strtoupper() Function:

                                    strtoupper() function that is use to convert the string in uppercase letters. It is also very useful function in php many example of this function in php one of them comparison the value from data base.

Syntax:

          strtoupper(string);

Example:

<?php
$str=”hello php”;
echo strtoupper($str);
?>

Output:


         HELLO PHP




0 comments:

Post a Comment