Re: PHP CODE ERROR?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux