Jump to content

Undefined offset:


homer.favenir

Recommended Posts

hi,

can anyone please help me,

i have an error

A PHP Error was encountered



Severity: Notice


Message:  Undefined offset:  172


Filename: views/process.php


Line Number: 53

 

i tried a lot of search in the net, and i cant find appropriate answer.

 

please

 

thanks

???

Link to comment
https://forums.phpfreaks.com/topic/128665-undefined-offset/
Share on other sites

hi,

i already fixed the problem, i used ISSET function,

but will it just hide the error or eliminate the error?

<?php
for($i = 2; $i <= $count_files; $i++)
{
	if(isset($qcfiles[$i]))
		{
            
			echo $qcfiles[$i] . "<br>";
			$file1 = file($kedir . "/" . $kefiles[$i]);
			$file2 = file($qcdir . "/" . $qcfiles[$i]);
			$file1_count = count($file1);
			$file2_count = count($file2);
			$count = 1;
			for($x = 0; $x <= $file1_count; $x++)
			{
				if(isset($file1[$x]) && isset($file2[$x]))
				{
					$vtag1 = substr($file1[$x],178,1);
					$vtag2 = substr($file2[$x],178,1);
					$page1 = substr($file1[$x],0,4);
					$page2 = substr($file2[$x],0,4);
					$name1 = substr($file1[$x],7,78);
					$name2 = substr($file2[$x],7,78);
					$addr1 = substr($file1[$x], 1, 78);
					$addr2 = substr($file2[$x], 1, 78);
					$city1 = substr($file1[$x], 79, 30);
					$city2 = substr($file2[$x], 79, 30);
					$state1 = substr($file1[$x], 110, 2);
					$state2 = substr($file2[$x], 110, 2);
					$zc1 = substr($file1[$x], 112, 5);
					$zc2 = substr($file2[$x], 112, 5);
					$tf1 = substr($file1[$x], 123, 40);
					$tf2 = substr($file2[$x], 123, 40);
					$ac1 = substr($file1[$x], 164, 3);
					$ac2 = substr($file2[$x], 164, 3);
					$phone1  = substr($file1[$x], 168, 7);
					$phone2  = substr($file2[$x], 168, 7);
					if($vtag2 == 1)
					{
[/code

Link to comment
https://forums.phpfreaks.com/topic/128665-undefined-offset/#findComment-666885
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.