Hi I am new to this site and was hoping to get a little help. I am in the learning stages and creating an object-oriented programming using php. I have two files, an idex file and a vehicle.php file. I keep getting the following errors:
Parse error: syntax error, unexpected ';', expecting T_FUNCTION in/home/msj03/html/lis5367/lib/vehicle.php on line 92
The last line, the one in red is line 92- can anyone help? Thanks,
<?php
//define class
class vehicle1
{
//private properties (class variables)
private $vin;
private $manufacturer;
private $type;
private $color;
private $price;
//public methods/functions
//default constructor
public function __construct($vin="12345678901234567", $manufacturer="Toyota", $type="Tundra", $color="White", $price=25000)
{
$this->vin = $vin;
$this->manufacturer = $manufacturer;
$this->type = $type;
$this->color = $color;
$this->price = $price;
}
function __destruct()
{
//unset($this);
echo "Destroying " . $this->vin . "<br />";
}
//value-returning functions
//getter methods/functions (get object's properties)
public function getvehicle1()
{
return $this->vin . " " . $this->manufacturer . " " . $this->type . " " . $this->color . " " . $this->price . " " ;
}
public function getvin()
{
return $this->vin;
}
public function getmanufacturer()
{
return $this->manufacturer;
}
public function gettype()
{
return $this->type;
}
public function getcolor()
{
return $this->color;
}
public function getprice()
{
return $this->price;
}
//setter methods/functions (set object's properties)
public function setvin($vin)
{
$this->vin = $vin;
}
public function setmanufacturer($manufacturer)
{
$this->manufacturer = $manufacturer;
}
public function settype($type)
{
$this->type = $type;
}
public function setcolor($color)
{
$this->color = $color;
}
public function setprice($price)
{
$this->price = $price;
}//end class
?>