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 5 12345 LastLast
Results 1 to 10 of 45
  1. #1
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default [PHP] Explain that function!

    Well its very boring at the moment, and i can see a few web programmers are online

    So i thought (to some peoples displeasure) that it would be fun to make a thread, letting people explain some functions etc.

    And of course YES you can go to php.net, but some people find the site of it scary (although its a fit resource).

    There are many functions that some people may know which others may have never heard of.

    YOU MAY POST DEFINITIONS OFF OTHER SITES, BUT YOU MUST CREDIT THEM.


    I will start off nice and easy

    echo();

    PHP Code:
    <?PHP
    echo "Hello world!";
    ?>
    Outputs all parameters.
    echo() is not actually a function (it is a language construct), so you are not required to use parentheses with it. echo() (unlike some other language constructs) does not behave like a function, so it cannot always be used in the context of a function. Additionally, if you want to pass more than one parameter to echo(), the parameters must not be enclosed within parentheses.

    TAKEN FROM PHP.NET

  2. #2
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    What. the. hell. is. the. point. in. this. thread?

    Let us all copy pages from PHP.net. WOO.

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

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    Well its very boring at the moment, and i can see a few web programmers are online

    So i thought (to some peoples displeasure) that it would be fun to make a thread, letting people explain some functions etc.

    And of course YES you can go to php.net, but some people find the site of it scary (although its a fit resource).

    There are many functions that some people may know which others may have never heard of.

    YOU MAY POST DEFINITIONS OFF OTHER SITES, BUT YOU MUST CREDIT THEM.


    I will start off nice and easy

    echo();

    PHP Code:
    <?PHP
    echo "Hello world!";
    ?>
    Outputs all parameters.
    echo() is not actually a function (it is a language construct), so you are not required to use parentheses with it. echo() (unlike some other language constructs) does not behave like a function, so it cannot always be used in the context of a function. Additionally, if you want to pass more than one parameter to echo(), the parameters must not be enclosed within parentheses.

    TAKEN FROM PHP.NET
    Should be echo 'hello' unless you need literal newlines etc.


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

  4. #4
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    <?php
    echo "<a href=\"http://php.net\">Click here for all definitions, then we dont need this thread </a>";
    ?>
    Lets set the stage on fire, and hollywood will be jealous.

  5. #5
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    Wahey. Nicely done.

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

    Latest Awards:

    Default

    Quote Originally Posted by Tom743 View Post
    <?php
    echo "<a href=\"http://php.net\">Click here for all definitions, then we dont need this thread </a>";
    ?>
    negative:

    echo( '<a href="http://www.php.net/en/manual">Click</a>' );

    () are my personal preference.


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

  7. #7
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Yeah i like brackets too

    Doing ""; just makes it confusing lol.
    Coming and going...
    Highers are getting the better of me

  8. #8
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Woah sorry, u lot were at skool and i was bored.

    I used to use () but i thought it was improper syntax or w/e..

    was i wrong?

  9. #9
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    I always thought brackets was proper syntax. They wouldn't be there for nothing.

    I swear
    echo "Hello";

    is out dated compared to

    echo("Hello");

    Or am I just being an idiot


  10. #10
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by L?KE View Post
    I always thought brackets was proper syntax. They wouldn't be there for nothing.

    I swear
    echo "Hello";

    is out dated compared to

    echo("Hello");

    Or am I just being an idiot
    Well i dunno, i just remember seeing "" without the () so i thought "Z0MG"

Page 1 of 5 12345 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
  •