cant figure out why i'm getting this error:
Warning: implode() [function.implode]: Invalid arguments passed in C:\Users\Travis\Documents\choicegrid\dam_spp.php on line 67
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
require_once('dom/simple_html_dom.php');
$url = "http://www.ercot.com/content/cdr/html/"; // The simple url
$name = "_dam_spp.html"; // The parameter name
$date = date("Ymd");
//$date = date("Ymd",time()+60*60*24); // The parameter value
$newUrl = $url . "$date$name"; // appending the values
//echo $newUrl;
$html = file_get_html ($newUrl);
// get the table. Maybe there's just one, in which case just 'table' will do
// Displays Extra Debug Info
$dbg = 1;
// Read DOM
// get the table. Maybe there's just one, in which case just 'table' will do
//$table = $html->find('#theTable');
// initialize empty array to store the data array from each row
$theData = array();
// loop over rows
foreach ($html->find('table') as $table) {
}
foreach($table->find('tr') as $row) {
// initialize array to store the cell data from each row
$rowData = array();
foreach($row->find('td') as $cell) {
// push the cell's text to the array
$rowData[] = $cell->plaintext;
}
// push the row's data array to the 'big' array
$theData[] = $rowData;
unset($theData[0]);
}
foreach ($theData as $rows => $newData) {
echo "<b>$rows</b><br>";
foreach ($newData as $key => $value){
echo "$key - $value<br>";
$astring = implode("', '", $value);
$astringTwo = "'".$astring."'";
echo "astringTwo <br>";
}
}