Trouble with code
Posted: Fri May 30, 2003 6:47 pm
Hey, I am trying to make a mysql class that will make it real easy for me to work with mysql data. Anyway, I got started and I got this error:
Parse error: parse error, unexpected T_VARIABLE, expecting '(' in C:\Program Files\Apache Group\Apache2\mc0\classes\mysqlClass.php on line 46
I tracked down line 46 and saw no problem with it? I looked a few lines up, no errors there. But maybe that is why there is an error, I just don't know what the hell I am doing.
Here is the code that seems to not be working:
Anyone spot the problem?
Parse error: parse error, unexpected T_VARIABLE, expecting '(' in C:\Program Files\Apache Group\Apache2\mc0\classes\mysqlClass.php on line 46
I tracked down line 46 and saw no problem with it? I looked a few lines up, no errors there. But maybe that is why there is an error, I just don't know what the hell I am doing.
Here is the code that seems to not be working:
Code: Select all
function PrintRows()
{
for ($this->counter = 0; $this->counter <= $this->totalRows; $this->counter++)
{
mysql_data_seek($this->result, $this->counter) or die("<p>Unable to seek out row: $this->counter</p><br>");
$this->data = mysql_fetch_array($this->result);
print '<tr>'; #line 46
for $this->col ($this->data)
{
print '<td>$this->col</td>';
}
print '</tr>';
}
}