undefined offset 0, someone help identify where the error is. am using codeigniter.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • viana2020
    New Member
    • Aug 2015
    • 14

    #1

    undefined offset 0, someone help identify where the error is. am using codeigniter.

    Code:
    if(isset($getall))
    {
    
    $PostDate = array(
            'name'          => 'PostDate',
            'value'         => $getall['0']['PostDate'],
    
    );
    $LocCode = array(
            'name'          => 'LocCode',
            'value'         => $getall['0']['LocCode'],
    
    );
    
    $DeptCode = array(
            'name'          => 'DeptCode',
            'value'         => $getall['0']['DeptCode'],
    
    );
    $Shift = array(
            'name'          => 'Shift',
            'value'         => $getall['0']['Shift'],
    
    );
    }
    Last edited by RonB; Oct 16 '15, 01:35 PM. Reason: Please use the code tags!
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    Dump out $getall with either print_r($getall ); or var_dump($getal l); to see its structure. It's probably not what you expect.

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #3
      Are you sure 0 should be in quotes? '0' the string is not the same thing as 0 the number.

      Comment

      Working...