Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7636053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:34:37+00:00 2026-05-31T07:34:37+00:00

I know this must be a fairly simple question, but I haven’t managed to

  • 0

I know this must be a fairly simple question, but I haven’t managed to stumble across an answer yet.

I have the following array

$qid[0][0]=1;
$qid[1][0]=2;
$qid[2][0]=3;
$qid[3][0]=4;

When I use print_r($qid) I get the following

Array ( 
 [0] => Array ( [0] => 1 [1] => 0 ) 
 [1] => Array ( [0] => 2 ) 
 [2] => Array ( [0] => 3 ) 
 [3] => Array ( [0] => 4 )
) 

I don’t understand [1] => 0

in

[0] => Array ( [0] => 1 [1] => 0 )

If someone could explain what [1] => 0 means in this array, I’d greatly appreciate it. Thanks.

EDIT: It turns out that my array was indeed different to what I had written above, because it had been modified later in the code. Thanks everyone for the great answers. I’m still reading over them all and trying to make my mind understand them (Arrays turn my mind to jello).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:34:39+00:00Added an answer on May 31, 2026 at 7:34 am

    [1] => 0 denotes an array element with the value 0.

    The numbers in [] are array keys. So [1] is the second element of a numerically indexed array, (which starts with [0]), and the value of the second element ([1]) is 0.

    PHP uses => as an operator to relate array keys/indices to their values.

    So an overall explanation of this structure:

    Array ( 
     [0] => Array ( [0] => 1 [1] => 0 ) 
     [1] => Array ( [0] => 2 ) 
     [2] => Array ( [0] => 3 ) 
     [3] => Array ( [0] => 4 )
    ) 
    

    The outer array is a numerically indexed array, and each of its elements is a sub-array. The first of them ([0]) is an array containing 2 elements, while the rest of them ([1] through [3]) are arrays containing only one single element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this isn't strictly a programming question but y'all must have experienced this.
I am fairly familiar with creating simple custom controls, but I haven't had this
this might be fairly simple but I cant find my way around... I have
I know this can be implemented fairly easily but I must use a standard
I know SQL well but I must be missing something really dumb here. This
I know this is a broad question, but I've inherited several poor performers and
A fairly broad question I know, apologies for that! So I have a data
How do I lock compiled Java classes to prevent decompilation? I know this must
I'm just to figure out what does this method do, I know there must
Know this might be rather basic, but I been trying to figure out how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.