Re: Code errors

From: Date: Thu, 18 Jul 2002 14:33:51 +0000
Subject: Re: Code errors
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-108258@lists.php.net to get a copy of this message
Which line in the script you had provided to us is line 247? "Chris Crane" <ccrane@inxdesign.com> wrote in message news:20020718141429.52411.qmail@pb1.pair.com... > I am trying some code and it works except I get the following errors... > Warning: Undefined offset: 5 in > c:\www\htdocs\demos\havasuinternet\havasuinternet-lib.php on line 247 > Warning: Undefined offset: 4 in > c:\www\htdocs\demos\havasuinternet\havasuinternet-lib.php on line 247 > Warning: Undefined offset: 3 in > c:\www\htdocs\demos\havasuinternet\havasuinternet-lib.php on line 247 > Warning: Undefined offset: 2 in > c:\www\htdocs\demos\havasuinternet\havasuinternet-lib.php on line 247 > Warning: Undefined offset: 1 in > c:\www\htdocs\demos\havasuinternet\havasuinternet-lib.php on line 247 > > > Here is the code, could someone tell me what's wrong. I don't see anything > wrong... > > function HistoricalStock($sym) { > $LookupURL = > "http://table.finance.yahoo.com/table.csv?a=7&b=1&c=2002&d=7&e=17&f=2002&s=$ > sym&y=0&g=d&ignore=.csv"; > $Results = implode('', file("$LookupURL")); > $Data = explode("\n", $Results); > print '<table width="100%" border="0" cellspacing="1" > cellpadding="0" > bgcolor="#6699cc"><tr bgcolor="#FFFFFF">'; > foreach($Data as $Line) { > list($H_Date, $H_Open, $H_High, $H_Low, $H_Close, $H_Volume) = split(",", > $Line); > print "<tr bgcolor=\"#FFFFFF\"> > > <td>$H_Date</td>\n<td>$H_Open</td>\n<td>$H_High</td>\n<td>$H_Low</td>\n<td>$ > H_Close</td>\n<td>$H_Volume</td>\n</tr>"; > } > print '</table>'; > } > >

« previous php.general (#108258) next »