Here is my very basic class definition. When I run this script, it tells me "Warning: Missing argument 1 for custgrid() "
According to everything I have read, this should automatically set my class variable because the function has the same name as the class. PLEASE HELP!
<?php
$customer = "John";
class CustGrid
{
//class variable definitions
var $parent_customer;
//setter function for class variables
function CustGrid ($customer)
{
$this->parent_customer = $customer;
}
function getCustomer()
{
return $this->parent_customer;
}
}
$customerinfo = new CustGrid();
$return = $customerinfo->getCustomer();
print $return;
?>