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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:58:52+00:00 2026-05-30T16:58:52+00:00

array(1) { [0]=> array(6) { [id]=> string(3) 275 [course]=> string(2) 92 [name]=> string(33) Tutorial

  • 0
array(1) { [0]=> array(6) { ["id"]=> string(3) "275" ["course"]=> string(2) "92" 
["name"]=> string(33) "Tutorial - Transforming 2D Shapes" ["activitylink"]=> string(4) 
"2488" ["available"]=> string(10) "1330626600" ["deadline"]=> string(10) "1330630200" } }

array(1) { [0]=> array(6) { ["id"]=> string(3) "422" ["course"]=> string(3) "130" 
["name"]=> string(8) "tester 2" ["activitylink"]=> string(1) "0" ["available"]=> 
string(10) "1330691375" ["deadline"]=> string(10) "1330694135" } }

 array(1) { [0]=>   array(6) { ["id"]=> string(3) "423" ["course"]=> string(3) "132"      ["name"]=> string(10) "LessonName" ["activitylink"]=> string(1) "0" ["available"]=> string(10)
 "1330770900" ["deadline"]=> string(10) "1330781700" } }

I am retrieving data from a function where it returns an array of Lessons and the information about it.

I am able to do var_dump($lessonArray) and the result is the bit of output I’ve pasted here. However, I am trying to access the available field with no success. I’ve done var_dump($lessonArray['available']) and print_r($lessonArray['available']) but all it returns is NULL.

  • 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-30T16:58:53+00:00Added an answer on May 30, 2026 at 4:58 pm

    In the three cases you posted, you actually have nested arrays. This array(1) { [0]=> indicates that the first array contains a key 0. And this array(1) { [0]=> array(6) indicates that the key 0 of the first array is a second array.

    Thus, $lessonArray[0] should be:

    array(6) { ["id"]=> string(3) "422" ["course"]=> string(3) "130" 
    ["name"]=> string(8) "tester 2" ["activitylink"]=> string(1) "0" ["available"]=> 
    string(10) "1330691375" ["deadline"]=> string(10) "1330694135" }
    

    And $lessonArray[0]['name'] should be ‘tester 2’, $lessonArray[0]['available'] should be ‘1330691375’ and so on.

    If you had used print_r($lessonArray) instead of var_dump($lessonArray), you would have spotted the difference 🙂

    So I second JamWaffles comment to use print_r, I myself prefer print_r unless I really want to get picky on the types of the values.

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

Sidebar

Related Questions

I have a list activity .I have created a array string []name = new
I have a string array: string[] authors = new string[3]; authors[0] = Charles Dickens;
Consider this array string[] presidents = { Adams, Arthur, Buchanan, Bush, Carter, Cleveland, Clinton,
I have this array: string[,] productData = new string[5,7]; I bind it to a
I have seven words in the array: string[7] = {x,x,x,x,x,x,x}; the x is generated
I need just dictionary or associative array string => int . There is type
//assign variables string measurementIn; //read in file in array string[] lines = File.ReadAllLines(../../convert.txt); //ask
Consider a string array shaped like this: string[] someName = new string[] { First,
i have an array below string stringArray = new stringArray[12]; stringArray[0] = 0,1; stringArray[1]
I have a string array in C# and I intend to copy it in

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.