Results 1 to 3 of 3

Thread: PHP array()

  1. #1
    Join Date
    Aug 2009
    Posts
    1
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default PHP array()

    Definition and Usage

    array() creates an array, with keys and values. If you skip the keys when you specify an array, an integer key is generated, starting at 0 and increases by 1 for each value.


    Example 1
    <?php
    $a=array("a"=>"Dog","b"=>"Cat","c"=>"Horse");
    print_r($a);
    ?>

    The output of the code above will be:
    Array ( [a] => Dog [b] => Cat [c] => Horse )


    Example 2
    <?php
    $a=array("Dog","Cat","Horse");
    print_r($a);
    ?>

    The output of the code above will be:
    Array ( [0] => Dog [1] => Cat [2] => Horse )


    visit us:
    [SPAM REMOVED]
    Last edited by djr33; 06-09-2010 at 06:21 PM.

  2. The Following User Says Thank You to itxen For This Useful Post:

    infocusweb (06-11-2010)

  3. #2
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    hello friend
    i am jaydeep dave. i am working as php web development. i need help that i want to create dynamic category so how i create which can i added through database.

  4. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The post that you replied to is spam. I removed the spam link, but I left this thread so that I did not delete your question, but I am going to CLOSE this conversation because you should start a new topic for your question. Also, please post more information. Are you using a database? Is this related to arrays? What are your goals? Can you link to your website?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. The Following User Says Thank You to djr33 For This Useful Post:

    infocusweb (06-11-2010)

Bookmarks

Posting Permissions

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