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 4 1234 LastLast
Results 1 to 10 of 37
  1. #1
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default Noob PHP question!

    Hey, A few weeks back i kept coming here to ask for help when i was playing around with a PHP thingy i was doing, now i want to delve even more into PHP, and although ive looked around i cant find anything that will tell me what an array, actually is. They give you examples, but i'd be grateful if anyone can help me on how and when they are used

    Sorry if its noobish, and dont forget, im only learning
    thanks for any help (rep )
    Back for a while

  2. #2
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    http://uk.php.net/array - All you need to know about arrays
    Back for a while.

  3. #3
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    ta babes
    Back for a while

  4. #4
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    PHP Code:
    <?php
    $robbie 
    = array("awesome","amazing","godly","fantastic","superb","wonderful");

    foreach(
    $robbie as $value) {
    echo 
    'Robbie is ' $value ' and thats a fact';
    }

    ?>
    Last edited by Robbie; 06-03-2009 at 06:20 PM.

  5. #5
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    Quote Originally Posted by Robbie! View Post
    PHP Code:
    <?php
    $robbie 
    = array("awesome","amazing","godly","fantastic","superb","wonderful");

    foreach(
    $robbie as $value) {
    echo 
    'Robbie is ' $value ' and thats a fact';
    }

    ?>

    Can you explain?

    Does that mean like it picks one randomely and echo's Robbie is (either) awesome or amazing etc..
    Last edited by Robbie; 06-03-2009 at 06:21 PM.
    Back for a while

  6. #6
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    That will show them all.

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

    Latest Awards:

    Default

    Arrays are a object in PHP (and most other languages) which store multiple values. You can store these values and and read them in a variety of ways. In Robbie's example, he uses the foreach structure - this goes through each item in the array systematically, and does something with each value.



    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)


  8. #8
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    Thanks for the help Still dont get it but i appreciate the help and i guess the more i read about it, the more i'll learn Picked up some basics though =D
    Back for a while

  9. #9
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    2,015
    Tokens
    568

    Latest Awards:


  10. #10
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    I actualthink i get the basics of it now
    Thanks alot, that post above helped alot lol
    Back for a while

Page 1 of 4 1234 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
  •