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

Related Questions

I have this source code from 2001 that I would like to compile. It
I have this source code: idx=0 b=plt.psd(dOD[:,idx],Fs=self.fs,NFFT=512) B=np.zeros((2*len(self.Chan),len(b[0]))) B[idx,:]=20*log10(b[0]) c=plt.psd(dOD_filt[:,idx],Fs=self.fs,NFFT=512) C=np.zeros((2*len(self.Chan),len(b[0]))) C[idx,:]=20*log10(c[0]) for idx
I have this source code where I got it from net tutsplus. I have
I have this source data [gallery] Title [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [/gallery]
I have generated this source code automatically the same way for all fields why
I have this source code: public static void FTP_SERVER() { FtpWebRequest request = (FtpWebRequest)WebRequest.Create(ftp://myurl.com/mainfolder/);
I have this source code: var Game = function() { var canvas = document.getElementById('world');
I have this source code at the moment, but the issue I am having
I have an application whose source code is checked into a public repository. This
So we have a photo like this (source: vkontakte.ru ) How to detect that

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.