I'm trying to parse a class, but I get this strange error. The error says: "Parse error: parse error, expecting T_OLD_FUNCTION' orT_FUNCTION' or T_VAR' or'}'' in /home/usr-username/eclasses/query.php on line 6"
My "query.php" file contains the class definition. On line 6 there is a member declared. The code looks something like this:
<?
class query{
var $q_string;
var $q_type;
var $q_firstname;
var $q_secondname;
var $q_connection;
var $q_db;
var $q_host;
var $q_numberrows;
var $q_numbercolumns;
var $q_openstatus;
function query($qry_str){
global $HOST, $DB, $WEBUSER, $WEBPASSWORD;
$this->set_query_string($qry_str);
$this->sethost($HOST);
$this->setdb($D😎;
$this->setdbuser($WEBUSER);
$this->setdbpassword($WEBPASSWORD);
$this->setdbconnection($FALSE);
}
// Bunch of set and get methods
?>
Line 6 is the line with "var $q_firstname;". I've been breaking my neck on this one; checked if it's not a bracket pair problem or a semicolon.
This class file is included in another file and the globals are declared in another file. The include command for that file appears before the include command for this class file. Any hints to solve this problem?
TIA.
Ramsy