Results 1 to 3 of 3

Thread: Array Question

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Array Question

    How can I setup an array so I can access it like this:

    PHP Code:
    echo $config["forumtitle"];

    //would output VB Q and A, for example 
    Rather than:

    PHP Code:
    echo $config[122]; 
    Thanks in advance.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    Fanatic Member Gimlin's Avatar
    Join Date
    Dec 2001
    Location
    Hell
    Posts
    734
    Like this I think.

    PHP Code:
    $PhoebeDog = array (
            
    name=>"Phoebe",
            
    description=>"fat dog",
            
    color=>"grey and white",
            
    age=>7
                    
    ); 

  3. #3

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    That works great, thanks!
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width