<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>[PHP] undefined offset</title>
        <description> Sorry - can't seem to find anything that explains this on google.

I'm using a List command to break out an array into distinct field names.  I 
keep getting these errors as I go thru my loop::

Notice: Undefined offset: 10 in (.....) on line 151
Notice: Undefined offset: 9 in (.....) on line 151
Notice: Undefined offset: 8 in (.....) on line 151
Notice: Undefined offset: 7 in (.....) on line 151
Notice: Undefined offset: 6 in (.....) on line 151
Notice: Undefined offset: 5 in (.....) on line 151
Notice: Undefined offset: 4 in (.....) on line 151
Notice: Undefined offset: 3 in (.....) on line 151
Notice: Undefined offset: 2 in (.....) on line 151
Notice: Undefined offset: 1 in (.....) on line 151

The array is loaded with
  while ($line = fgetcsv($hdlin))

My trouble line of code is:
   list($LastName, $FirstName,$MI, $Eventcode,$Event_Partner_Ln, 
$Event_Partner_Fn, $Event_Partner_MI,$t,$u,$v,$Draw_pos) = $line;

I've confirmed that I have a field name for each element in my rows.  All 
the rows are the same size naturally.  So - what is it telling me? 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php</description>
        <link>http://www.serverphorums.com/read.php?8,486579,486579#msg-486579</link>
        <lastBuildDate>Sat, 18 May 2013 10:46:55 +0200</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,486579,486581#msg-486581</guid>
            <title>Re: [PHP] undefined offset</title>
            <link>http://www.serverphorums.com/read.php?8,486579,486581#msg-486581</link>
            <description><![CDATA[ Thanks.  That was it  -my last line was null.<br />
----- Original Message ----- <br />
From: &quot;Stuart Dallas&quot; &lt;stuart@3ft9.com&gt;<br />
To: &quot;Jim Giner&quot; &lt;jim.giner@albanyhandball.com&gt;<br />
Cc: &lt;php-general@lists.php.net&gt;<br />
Sent: Thursday, April 26, 2012 4:21 PM<br />
Subject: Re: [PHP] undefined offset<br />
<br />
<br />
On 26 Apr 2012, at 21:20, Jim Giner wrote:<br />
<br />
&gt; Sorry - can't seem to find anything that explains this on google.<br />
&gt;<br />
&gt; I'm using a List command to break out an array into distinct field names. <br />
&gt; I<br />
&gt; keep getting these errors as I go thru my loop::<br />
&gt;<br />
&gt; Notice: Undefined offset: 10 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 9 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 8 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 7 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 6 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 5 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 4 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 3 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 2 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 1 in (.....) on line 151<br />
&gt;<br />
&gt; The array is loaded with<br />
&gt;  while ($line = fgetcsv($hdlin))<br />
&gt;<br />
&gt; My trouble line of code is:<br />
&gt;   list($LastName, $FirstName,$MI, $Eventcode,$Event_Partner_Ln,<br />
&gt; $Event_Partner_Fn, $Event_Partner_MI,$t,$u,$v,$Draw_pos) = $line;<br />
&gt;<br />
&gt; I've confirmed that I have a field name for each element in my rows.  All<br />
&gt; the rows are the same size naturally.  So - what is it telling me?<br />
<br />
For every iteration of the loop or just once? If it's just once then you're <br />
not handling the possibility of a blank line. If more than once then the <br />
file doesn't contain what you think it contains.<br />
<br />
-Stuart<br />
<br />
-- <br />
Stuart Dallas<br />
3ft9 Ltd<br />
<a href="http://3ft9.com/" target="_blank"  rel="nofollow">http://3ft9.com/</a><br />
<br />
<br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Jim Giner</dc:creator>
            <category>php-general</category>
            <pubDate>Thu, 26 Apr 2012 22:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,486579,486580#msg-486580</guid>
            <title>Re: [PHP] undefined offset</title>
            <link>http://www.serverphorums.com/read.php?8,486579,486580#msg-486580</link>
            <description><![CDATA[ On 26 Apr 2012, at 21:20, Jim Giner wrote:<br />
<br />
&gt; Sorry - can't seem to find anything that explains this on google.<br />
&gt; <br />
&gt; I'm using a List command to break out an array into distinct field names.  I <br />
&gt; keep getting these errors as I go thru my loop::<br />
&gt; <br />
&gt; Notice: Undefined offset: 10 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 9 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 8 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 7 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 6 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 5 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 4 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 3 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 2 in (.....) on line 151<br />
&gt; Notice: Undefined offset: 1 in (.....) on line 151<br />
&gt; <br />
&gt; The array is loaded with<br />
&gt;  while ($line = fgetcsv($hdlin))<br />
&gt; <br />
&gt; My trouble line of code is:<br />
&gt;   list($LastName, $FirstName,$MI, $Eventcode,$Event_Partner_Ln, <br />
&gt; $Event_Partner_Fn, $Event_Partner_MI,$t,$u,$v,$Draw_pos) = $line;<br />
&gt; <br />
&gt; I've confirmed that I have a field name for each element in my rows.  All <br />
&gt; the rows are the same size naturally.  So - what is it telling me? <br />
<br />
For every iteration of the loop or just once? If it's just once then you're not handling the possibility of a blank line. If more than once then the file doesn't contain what you think it contains.<br />
<br />
-Stuart<br />
<br />
-- <br />
Stuart Dallas<br />
3ft9 Ltd<br />
<a href="http://3ft9.com/" target="_blank"  rel="nofollow">http://3ft9.com/</a><br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Stuart Dallas</dc:creator>
            <category>php-general</category>
            <pubDate>Thu, 26 Apr 2012 22:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,486579,486579#msg-486579</guid>
            <title>[PHP] undefined offset</title>
            <link>http://www.serverphorums.com/read.php?8,486579,486579#msg-486579</link>
            <description><![CDATA[ Sorry - can't seem to find anything that explains this on google.<br />
<br />
I'm using a List command to break out an array into distinct field names.  I <br />
keep getting these errors as I go thru my loop::<br />
<br />
Notice: Undefined offset: 10 in (.....) on line 151<br />
Notice: Undefined offset: 9 in (.....) on line 151<br />
Notice: Undefined offset: 8 in (.....) on line 151<br />
Notice: Undefined offset: 7 in (.....) on line 151<br />
Notice: Undefined offset: 6 in (.....) on line 151<br />
Notice: Undefined offset: 5 in (.....) on line 151<br />
Notice: Undefined offset: 4 in (.....) on line 151<br />
Notice: Undefined offset: 3 in (.....) on line 151<br />
Notice: Undefined offset: 2 in (.....) on line 151<br />
Notice: Undefined offset: 1 in (.....) on line 151<br />
<br />
The array is loaded with<br />
  while ($line = fgetcsv($hdlin))<br />
<br />
My trouble line of code is:<br />
   list($LastName, $FirstName,$MI, $Eventcode,$Event_Partner_Ln, <br />
$Event_Partner_Fn, $Event_Partner_MI,$t,$u,$v,$Draw_pos) = $line;<br />
<br />
I've confirmed that I have a field name for each element in my rows.  All <br />
the rows are the same size naturally.  So - what is it telling me? <br />
<br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Jim Giner</dc:creator>
            <category>php-general</category>
            <pubDate>Thu, 26 Apr 2012 22:30:02 +0200</pubDate>
        </item>
    </channel>
</rss>
