PHP Array breaking -
This works on my test environment, but there is a later version of PHP on my live server which is throwing an error And break my program
is the code
$ oldFile = fopen ("D: / ftpfolderreport / report /". $ Last_file, "r"); While (! FIF ($ old file)) {$ buffer = fgets ($ old file); $ Buffaloire = explosion (",", $ buffler); $ = $ Buffer ray [0]; $ Old filing array [$ K] = $ Buffer comes [1]; } Fclose ($ old file);
This row:
$ old filing array [$ key] = $ Buffer array [1];
is throwing this error
Notice: Undefined offset: 1 in D: \ apps \ wamp \ www \ compliance 2 \ CompareFTPRPPPPP line 57 I think that this is to do so that I am adding the $ key converter inside the argument. I have tried to do it as ["$ key"] and ['$'], but do not like it I have tried to define the key variable in the program first but then I do not even like it. I am searching online but can not get anything for help, anybody have any ideas?
Thank you, Stephen.
Add check for blank
if (! Buffler Array [1])) {$ key = $ bufflerArray [0]; $ Old filing array [$ K] = $ Buffer comes [1]; }
Comments
Post a Comment