Jump to content

[SOLVED] Undefined offset?


zeeshan_haider000

Recommended Posts

Hi,

I am getting this error:

 

Notice: Undefined offset: 2 in /homepages/46/d272861742/htdocs/i.com/sitev2/includes/functions.php on line 327

 

Notice: Undefined offset: 1 in /homepages/46/d272861742/htdocs/i.com/sitev2/includes/functions.php on line 327

 

And here is the code:

<?php
$cachefile = $files;
$cache1 = mysql_num_rows($result);
if (file_exists($cachefile)){
$line = file($cachefile);
$key = 0;
list( $s1, $cache, $s2) = split('\|\|', $line[$key]); //THIS IS LINE 327
?>

 

How do i get rid of this notice ( and btw i am trying to get the first line of the file and then destroy the array)?

Link to comment
https://forums.phpfreaks.com/topic/150421-solved-undefined-offset/
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.