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

  • Home
  • SEARCH
  • 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 1064067
In Process

The Archive Base Latest Questions

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

I am getting occasional Undefined offset issues when parsing a large file inside PHP.

  • 0

I am getting occasional Undefined offset issues when parsing a large file inside PHP.

How can I display the variables ONLY when the error occurs, to see what the issue is?

The error is occuring at this point of my php

list($export_date, $application_id, $language_code, $title, $description, $release_notes, $company_url, $suppport_url, $screenshot_url_1, $screenshot_url_2, $screenshot_url_3, $screenshot_url_4, $screenshot_width_height_1, $screenshot_width_height_2, $screenshot_width_height_3, $screenshot_width_height_4,$ipadscreenshot_url_1, $ipadscreenshot_url_2, $ipadscreenshot_url_3, $ipadscreenshot_url_4, $ipadscreenshot_width_height_1, $ipadscreenshot_width_height_2, $ipadscreenshot_width_height_3, $ipadscreenshot_width_height_4 ) = explode($delimiter, $line);

So I would like to echo all the variables on the offset error, if no error, just move onto the next record without doing anything.

  • 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-16T18:52:31+00:00Added an answer on May 16, 2026 at 6:52 pm

    the error will occur if explode($delimiter, $line) didn’t return as much parameters as the list statement requires, you can check if that’s the case like this:

    $parts = explode($delimiter, $line);
    if(count($parts)!=20) { //say your list needs 20 elements
      echo '20 parts expected, got '. count($parts). '<br />';//consider using error_log than echoing data
      var_dump($line, $parts);
    } else {
      list($export_date, $application_id, $language_code /*fill others*/) = $parts;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 530k
  • Answers 530k
  • 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 This is actually a pretty confusing topic. One reason why… May 16, 2026 at 11:35 pm
  • Editorial Team
    Editorial Team added an answer Not sure if this is "recommended practice", but on a… May 16, 2026 at 11:35 pm
  • Editorial Team
    Editorial Team added an answer 1.) Change the user's Registry entry at HKEY_Current_User\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell --… May 16, 2026 at 11:35 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

I'm getting occasional ConcurrencyError faults when using HTTPService in Flex 3. I have four
I've got this line of code: if request.user_agent.include?(iPhone) then But I'm occasionally getting this
I have a library that handles reading and writing a cache file. This library
I want to print numbers to a file using the stl with the number
I imagine most of you know what I am getting at. You start a
We have a dozen or so sites, as well as the occasional subdomains so:
Getting a NSString as follows: NSString *lastSyncDate = [[items objectAtIndex:0] objectForKey:@LastSyncDate]; This value is:
Getting super frustrated trying to get this working. Basically this is for a site
Does anyone know if this subversion bug has been dealt with? https://svn.apache.org/repos/asf/subversion/tags/1.6.9/www/faq.html#windows-access-denied I'm getting
My WinForms app uses a number of BackgroundWorker objects to retrieve information from a

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.