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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:36:49+00:00 2026-05-26T10:36:49+00:00

I have an array $attribGarden which looks like this: array(3) { [0]=> array(2) {

  • 0

I have an array $attribGarden which looks like this:

array(3) {
  [0]=>
  array(2) {
    ["property"]=>
    array(3) {
      ["typeKind"]=>
      string(9) "isolation"
      ["typeId"]=>
      int(76)
      ["valueId"]=>
      string(3) "386"
    }
    ["children"]=>
    array(2) {
      [0]=>
      array(2) {
        ["property"]=>
        array(3) {
          ["typeKind"]=>
          string(9) "isolation"
          ["typeId"]=>
          int(79)
          ["valueId"]=>
          string(3) "395"
        }
....
....
....

Also I have a function on the same page:

function ____storeAttribGarden($data, $parent = 0){

    foreach($data as $value){

        if($value['property']['typeKind'] == 'isolation'){
            // some action here
        }
    }
}

When the code executes, it’s throwing this error:

Undefined index: property in E:\xyz\proc_product.php on line 1743

// line 1743 refers to the if() condition of the function

I tried print_r(array_keys($value)); just before the if condition, and got the following output:

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

The print_r($value) gives this:

Array
(
    [property] => Array
        (
            [typeKind] => isolation
            [typeId] => 76
            [valueId] => 386
        )

    [children] => Array
        (
            [0] => Array
                (
                    [property] => Array
                        (
                            [typeKind] => isolation
                            [typeId] => 79
                            [valueId] => 395
                        )

So it’s clear that there is an index called ‘property’ in the array. But the function does not recognise it. What could be the problem? Am I doing anything wrong here?

Thanks for your time.

  • 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-26T10:36:49+00:00Added an answer on May 26, 2026 at 10:36 am

    At first I thought that you had simply messed up your hierarchy. However, I assume you are passing $attribGarden like this :

    ____storeAttribGarden($attribGarden);
    

    If so, then check if you are getting three errors in a row, or just one. If you are getting just one, then $attribGarden‘s structure is probably not uniform.

    Either that, or my original assumption was correct, and your hierarchy is still off.

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

Sidebar

Related Questions

I have array defined like this : ArrayList<String> items = new ArrayList<String>(); I have
I have a multi-dimensional array right now that looks like this: function art_appreciation_feeds() {
I have array that looks like this, Array ( [email_address] => Array ( [0]
I have array like this: array('1224*', '543*', '321*' ...) which contains about 17,00 "masks"
I have array like this: $path = array ( [0] => site\projects\terrace_and_balcony\mexico.jpg [1] =>
An array is defined of assumed elements like I have array like String[] strArray
I have array like this: $test = array(20, 30, 40); And I want to
I have array like this: $test = array(20, 30, 40); And I want to
I have array of objects person (int age; String name;) . How can I
I have array like this: array( 'person0' => array( 'name'=>'name0','address'=>'address0' ), 'person1' => array(

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.