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 6182671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:14:20+00:00 2026-05-24T01:14:20+00:00

So, I created an array, by manually adding each entry: $Sections[] = A.1.4.1;//900 0

  • 0

So, I created an array, by manually adding each entry:

$Sections[] = "A.1.4.1";//900 0 900 0 900 900 888 800 800 913 900 900 900
$Sections[] = "A.1.4.2.1";// 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 994 976 954 900 846 779 516 430 344 328 239 150
$Sections[] = "A.1.4.2.2";//900 900 900 900 900 900 900 900 900 900 850 800 750 700 650 600 550 500 376 356 336 227
$Sections[] = "A.1.4.2.3";//1000 1000 1000 1000 900 900 1000 1000 1000 1000 893 803 763 492 516 491 336 336 240 24
$Sections[] = "A.1.4.3";//1000 1000 879 588 560 366 192 867 807 665
$Sections[] = "A.1.4.4";//1000 1000 1000 1000 994 864 620 456 1000 1000 1000
$Sections[] = "A.1.5.1";//900 0 900 800 464
$Sections[] = "A.1.5.2";//a 1000 1000 846 240
$Sections[] = "A.1.5.2";//b 900 900 700 356 
$Sections[] = "A.1.5.3";//1000 879 192
$Sections[] = "A.1.5.4";//1012 922 456

//EU_A
$Sections[] = "A.2.5.1";//a 1048 1048 1048 1048 1004 800 576 378
$Sections[] = "A.2.5.1";//b 1048 1048 1048 1048 1004 820 592 384
$Sections[] = "A.2.5.2";//a 1048 1048  964  828  672 504 340 
$Sections[] = "A.2.5.2";//b 1048 1048  972  836  696 536 376
$Sections[] = "A.2.5.3";//a 1048 1048 1048 1048 1004 800 576 378
$Sections[] = "A.2.5.3";//b  944  944  944  944  944 820 592 384
$Sections[] = "A.2.5.3";//c 1048 1048 1048 1048 1004 820 592 384
$Sections[] = "A.2.5.4";//a 1048 1048 1048  910  776 560 308
$Sections[] = "A.2.5.4";//b  944  944  944  928  804 588 348
$Sections[] = "A.2.5.4";//c 1048 1048 1048  928  804 588 348
$Sections[] = "A.2.7.1";//   560  504  424  304  240 200
$Sections[] = "A.2.7.2";//   520  448  416  360  312 280

//EU_B
$Sections[] = "B.2.4.1";
$Sections[] = "B.2.4.1";
$Sections[] = "B.2.4.2";
$Sections[] = "B.2.4.2";
$Sections[] = "B.3.4.1";
$Sections[] = "B.3.4.1";
$Sections[] = "B.3.4.2";
$Sections[] = "B.3.4.2";

//TR-114
$Sections[] = "A.2.1";
$Sections[] = "A.2.2";

(You can feel free to ignore the comments, this was literally a cut and paste from my code)

The issue I have is that when I do

return $Sections;

and then try to reference any index, I get an error about it being uninitialized.

However, if I do

$return[] = $Sections;

return $return;

I am easily able to reference the indexes.

I’ve read the documentation for arrays thoroughly, but I do not understand why it does this. I know it works, I would just like to know why.

I can only assume that when the $Sections array is passed to the $return array, the indexes are somehow “refreshed” or “updated.”

Edit: I forgot to mention that this is inside a function, that returns the array created inside. I’m sure everyone would have grasped that pretty quickly, what with the return statement and all

  • 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-24T01:14:20+00:00Added an answer on May 24, 2026 at 1:14 am

    If you are attempting to access the indices as $Sections["B.2.4.1"], that will not work as it’s not how you’ve defined them. By using the [] syntax to append to the array, you are creating numeric indices.

    Your array really looks like the following, with each [] appended to the end of the array with a numeric index:

    $Sections[0] = "A.1.4.1";
    $Sections[1] = "A.1.4.2.1";
     // etc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created Array of Linkbutton and when user click on link button it
I have an array created with this code: var widthRange = new Array(); widthRange[46]
I have created an array Man: public main blah blah{ man = man[10]; }
I am trying to iterate a multidimension array created with the following line To
I have an array I've created in JavaScript. The end result comes out to
I created a custom button component that accepts an array as a property. I
I created a simple class in C++ which has a private dynamic array. In
I created a program that more or less holds an array of strings as
I'm currently turning an array of pixel values (originally created with a java.awt.image.PixelGrabber object)
How do I pass an array I have created on the server side onto

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.