Justtechjobs.com Find a programming school near you






Online Campus Both


php-windows | 2003112

Re: [PHP-WIN] PHP CODE ERROR? From: Piotr Pluciennik (ppluciennik <email protected>)
Date: 11/17/03

You've not defined any method for your class.
Read comments with ****** below.

HTH
Piotr

// Defining the Class's Properties -------
class Table
{
var $table_array = array();
var $headers = array();
var $cols;
} ********* here you've ended your class definition

********* so below it's not a constructor...
//Creating a Constructor ------
function Table( $headers )
{
$this->headers = $headers;
$this->cols = count ( $headers );
}

********* and addrow isn't also a member function of
your class
//The addROw() Method ------
function addRow( $row )
  {
  if ( count ($row) != $this->cols )
   return false;
  array_push($this->table_array, $row);
  return true;
  }

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php