Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: PHP..

  1. #1
    Join Date
    Feb 2006
    Location
    Sunderland
    Posts
    5,027
    Tokens
    1,306

    Latest Awards:

    Default PHP..

    Okay im new to PHP and i just need to know how to;

    Center somthing
    Put somthing on next line (Like <br>)
    Differant font and size etc..

    so style rly


  2. #2
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Erm.
    I presume you mean in an echo so:

    Code:
    <?php
    
    echo "<br/>"; IS NEW LINE
    echo "<center></center>"; IS CENTER
    echo "<font family=\"verdana\"></font>"; WOULD SET FAMILY.
    CBA writing more. Dunno if last one is right as I always use CSS for these things.


    You don't like me
    Chances are I don't like you.

  3. #3
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    PHP is not an alternative to HTML :s

    PHP is a server-side language.

  4. #4
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Yes tom. But im guessing he's asking for inner script etc.


    You don't like me
    Chances are I don't like you.

  5. #5
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    Erm.. php is a server side language which is run by the server to output html depending on the script you write. HTML is a mark-up language which is interpreted.

    Therefore php can dynamically change what is in the file and HTML displays this.

  6. #6
    Join Date
    Oct 2006
    Posts
    119
    Tokens
    0

    Default

    ooh, let's make it really complicated!

    PHP Code:
    <?php
    function center($text){
    echo 
    "<center>".$text."</center>";
    }

    function break(){
    echo 
    "<br />";
    }

     function 
    font($text,$font){
    echo 
    "<font family='".$font."'>".$text."</font>";
     }
     
     function 
    size($text,$size){
    echo 
    "<font size='".$size."'>".$text."</font>";
     }
     
    center("Centered Text");
    break();
    font("Verdana Text","verdana");
    break();
    size("Big Text",32);
    break();

    ?>

  7. #7
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Voldemort View Post
    ooh, let's make it really complicated!

    PHP Code:
    <?php
    function center($text){
    echo 
    "<center>".$text."</center>";
    }

    function break(){
    echo 
    "<br />";
    }

     function 
    font($text,$font){
    echo 
    "<font family='".$font."'>".$text."</font>";
     }
     
     function 
    size($text,$size){
    echo 
    "<font size='".$size."'>".$text."</font>";
     }
     
    center("Centered Text");
    break();
    font("Verdana Text","verdana");
    break();
    size("Big Text",32);
    break();

    ?>
    Lets make it more complicated, as that wasn't complicated, probably more complicated than you can understand!

    PHP Code:
    <?php
    class oh
    {
        function 
    yes($string)
        {
            
    $string ucfirst(strtolower($string));
            echo(
    "$string yes!<br />");
        }
        function 
    why($string)
        {
            
    $string ucfirst(strtolower($string));
            echo(
    "$string! but why?<br />");
        }
    }
    $lul = new oh;
    $lul->why("Rofl.");
    $lul->yes("Lol");
    ?>


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  8. #8
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    3,285
    Tokens
    0

    Latest Awards:

    Default

    lol at how many people will be confused by that



    i used to be NintendoNews. visit my blog or add me on twitter.
    need help with vista? i am a microsoft certified technology specialist in configuring windows vista and connected home integrator.. pm me for help!


    "I am the way, the truth, and the life. No one comes to the Father except through me"
    John 14:6 (NIV)


  9. #9
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Lets make it more complicated
    PHP Code:
    <?php
    class oh
    {
        function 
    yes($string)
        {
    eval(
    base64_decode('JHN0cmluZyA9IHVjZmlyc3Qoc3RydG9sb3dlcigkc3RyaW5nKSk7DQplY2hvKFwiJHN0cmluZyB5ZXMhPGJyIC8+XCIpOw=='));
        }
        function 
    why($string)
        {
    eval(
    base64_decode('JHN0cmluZyA9IHVjZmlyc3Qoc3RydG9sb3dlcigkc3RyaW5nKSk7DQplY2hvKFwiJHN0cmluZyEgYnV0IHdoeT88YnIgLz5cIik7'));
        }
    }
    $lul = new oh;
    $lul->why("Rofl.");
    $lul->yes("Lol");
    ?>

  10. #10
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    4,244
    Tokens
    0

    Latest Awards:

    Default

    Let's make it more complicated:

    PHP Code:
    <?PHP
    echo
    ?>
    A collection of forum users' views on obesity
    Quote Originally Posted by mynameisjake View Post
    sounds good
    Quote Originally Posted by Stephen View Post
    Just google it.
    Quote Originally Posted by jesus View Post
    jesus christ
    Quote Originally Posted by Alexicles. View Post
    It will probably soon go away.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •