Which line in the script you had provided to us is line 247? "Chris Crane" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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>'; > } > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php