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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:42:45+00:00 2026-05-13T11:42:45+00:00

This is the source $pData array I have: Array ( [code] => 105132 [globalImages]

  • 0

This is the source $pData array I have:

Array
(
    [code] => 105132
    [globalImages] => Array
        (
            [0] => 1148-1578-image_41ddeeef69eb94a8d9ccc1503d099810.jpg
        )

    [envImages] => Array
        (
            [0] => 1148-0-image_72e95c6424ec7bcd90994f1c0a3f4544.jpg
        )

    [attribs] => Array
        (
            [0] => Array
                (
                    [0] => Array
                        (
                            [id] => 1578
                            [uniqCode] => 105132-1578
                            [parentId] => 0
                            [type] => Colour
                        )
                )
        )
)

When I call a value using the following (line 337):

<?php echo strtolower($pData['attribs'][0][0]['type']);?>

PHP Error log has the following line:

[13-Jan-2010 11:48:21] PHP Notice:  Undefined offset: 0 in D:\apps\path\to\file\pages\product.php on line 337

What could I be doing wrong? As far as I see, there is nothing wrong with this simple call. May be someone see something fishy?

Thanks for any input!

EDIT 01:

I forgot to say that the echo produces correct result. But it also makes the specified entry entry in the error log.

The var_dump($pData['attribs']) output:

array(1) {
  [0]=>array(2) {
    [0]=>array(22) {
      ["id"]=>string(4) "1578"
      ["uniqCode"]=>string(11) "105132-1578"
      ["parentId"]=>string(1) "0"
      ["type"]=>string(6) "Colour"
      ["title"]=>string(5) "Beech"
      ["swatch"]=>string(22) "variant-437-swatch.jpg"
      ["width"]=>string(4) "1830"
      ["depth"]=>string(3) "610"
      ["height"]=>string(3) "740"
      ["floorToSeat"]=>string(1) "0"
      ["unit"]=>string(2) "mm"
      ["weight"]=>float(89)
      ["volume"]=>float(2.311)
      ["groupPack"]=>int(1)
      ["fobkl"]=>string(3) "407"
      ["br3"]=>string(3) "441"
      ["br2"]=>string(3) "467"
      ["br1"]=>string(3) "496"
      ["rcp"]=>string(3) "515"
      ["gwm"]=>string(3) "592"
      ["gem"]=>string(3) "618"
      ["images"]=>array(1) {
        [0]=>string(52) "1148-1578-image_41ddeeef69eb94a8d9ccc1503d099810.jpg"
      }
    }
    [1]=>array(22) {
      ["id"]=>string(4) "1577"
      ["uniqCode"]=>string(11) "105132-1577"
      ["parentId"]=>string(1) "0"
      ["type"]=>string(6) "Colour"
      ["title"]=>string(13) "Natural Maple"
      ["swatch"]=>string(22) "variant-436-swatch.jpg"
      ["width"]=>string(4) "1830"
      ["depth"]=>string(3) "610"
      ["height"]=>string(3) "740"
      ["floorToSeat"]=>string(1) "0"
      ["unit"]=>string(2) "mm"
      ["weight"]=>float(155.06)
      ["volume"]=>float(20.305)
      ["groupPack"]=>int(1)
      ["fobkl"]=>string(3) "407"
      ["br3"]=>string(3) "441"
      ["br2"]=>string(3) "467"
      ["br1"]=>string(3) "496"
      ["rcp"]=>string(3) "515"
      ["gwm"]=>string(3) "592"
      ["gem"]=>string(3) "618"
      ["images"]=>array(1) {
        [0]=>string(52) "1148-1577-image_9c4fc8337e5c106ea6b69863e68f54bb.jpg"
      }
    }
  }
}
  • 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-13T11:42:45+00:00Added an answer on May 13, 2026 at 11:42 am

    A debugger can help to find the error, e.g. xdebug and netbeans as frontend.

    Please verify that the source line in question really is echo strtolower($pData['attribs'][0][0]['type']), e.g. by using an error handler like:

    function myErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
    {
      if ( E_NOTICE===$errno && is_readable($errfile) ) {
        $source = file($errfile);
        for($i=max(0,$errline-4); $i<$errline+3; $i++ ) {
          if ( isset($source[$i]) ) {
            if ( $i+1===$errline ) {
              echo ' >>> ';
            }
            echo $source[$i];
          }
        }
      }
    
      return false;
    }
    $old_error_handler = set_error_handler('myErrorHandler');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 511k
  • Answers 511k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer When JRedis gets support for transaction semantics (Redis 1.3.n, JRedis… May 16, 2026 at 5:16 pm
  • Editorial Team
    Editorial Team added an answer Generally when you publish a website that makes use of… May 16, 2026 at 5:16 pm
  • Editorial Team
    Editorial Team added an answer The page elements are not disabled - doing that would… May 16, 2026 at 5:16 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

This code giving me fits. Returns the error: The given ColumnName 'COURSENAME' does not
Thanks to Code Poet, I am now working off of this code to parse
I have this problem and it's drivin' me nuts! So I am developing my
i'm trying to embed a swf to my as3 flex project like this: [Embed(source
I have created a xlt excel template which works fine in Excel 2007 under
I have one user who gets an error message when he closes his browser.
I have a directory which contains files and a number of levels of subdirectories:
A little help needed, I have a Macro automatically creating pivot tables and charts,
Im quite new to stackoverflow so I dont know if this question has been
My Excel VBA takes ~300 XLS files and grabs 8 cells to deposit into

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.