Ejemplo n.º 1
0
 function MyToUpperCase()
 {
     return lowerToUpper($this->string);
 }
    <div class=" well">
        <div class="row">
            <div align = "center">
                <h1> Give your lower case srting to convert upper case  </h1>
                <form action = "lowerUpperFunc.php" method = "get">
                    <input type="text" name="str" placeholder= "Your string"/> </br> </br>
                    <button type="submit">submit</button>
                </form>



                <?php 
include "C:/xampp/htdocs/Training/PHP/functions.php";
if (isset($_GET['str'])) {
    $string = $_GET["str"];
    $result = lowerToUpper($string);
    echo $result;
}
/*
           //
         $string = "saNJida" ;
           $length = strlen($string);
        // echo $length."<br>";
                       function lowerToUpper($string)
                        {

                            $length = strlen($string);
                            $string1 = "";
                            for($i=0;$i<$length;$i++)
                            {
                                // echo $string[$i]."<br>";