Friday, April 8, 2011

make lowercase letters to uppercase with php

| Friday, April 8, 2011 | 2 comments

make lowercase letters to uppercase with php
how to make a lowercase to uppercase in php? yes, here is the solution. type in textformat as below using notepad or dreamweafer. then save with name lowup.php
The following how to make it:
lowup



<html>
    <head>
        <title>lowercase letters to uppercase</title>
    </head>
   
    <style type="text/css">
        #kotak {
    width: 200px;
    background-color: #990000;
    margin: auto;
    -webkit-border-radius-:25px;
    -moz-border-radius:25px;
            }
        #label {
    text-align: center;
    padding: 10px;
    font-size: 14pt;
            }
        #input {
    margin: 3px;
            }
        #proses {
            margin: 5px;
            }
        #titles {
    text-align: center;
    padding: 10px;
    font-size: 14pt;
            }
        #hasil {
    text-align: center;
    padding: 10px;
    font-size: 18pt;
    background-color: #00FF00;
    -webkit-border-radius-:15px;
    -moz-border-radius:15px;
            }
        #pembatas {
            margin: 10px;
            }
    </style>
   
    <body>
        <form action=lowup.php method=get>
            <div id=kotak>
                <div id=label>Enter phrase below :
                    <div id=input>
                      <textarea name=phrase rows=2 cols=15></textarea>
                      <div id=proses><input type=submit value=Proses>
                        </div>
                    </div>
              </div>
            </div>
        </form>
       
        <?php
            $phrase = $_GET['phrase'];
            $pecah = explode(" ", $phrase);
            $jml = count($pecah);
            echo "<div id=kotak>
                    <div id=titles>Before processing:</div>
                    <div id=hasil>$phrase</div></div>";
            echo "<div id=pembatas></div>";
            echo "<div id=kotak>
                    <div id=titles>After processing:</div>
                    <div id=hasil>";
            for ($i=0; $i<=$jml; $i++){
                $kapital[$i] =  strtoupper(substr($pecah[$i],0,1));
                $baru[$i] = substr_replace($pecah[$i], " ".$kapital[$i],0,1);
                echo "$baru[$i]";
                }
            echo "</div></div>";
            ?>
           
    </body>
   
</html>

note :
save with name lowup.php
You can change the css one likes you
if you want to download php files, you can download here.
thank you

2 comments:

Johnny Wirjosandjojo said...

:) STMIK AMIKOM?

nino said...

hehehe, yups, thanks for visiting my blog

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

thank you for visiting my blog and comment here. I hope the commentary contains a comment which intend to build and repair. criticism and suggestions I gladly accept.

Popular Posts

 

Total Pageviews

stat

© Copyright 2010. http://programminghaha.blogspot.com . All rights reserved | http://programminghaha.blogspot.com is proudly powered by Blogger.com | Template by o-om.com - zoomtemplate.com