PHP data handling and manipulation examples.
";
echo $y;
?>
PHP data handling and manipulation examples.
color = $color;
$this->model = $model;
}
public function message() {
return "My car is a " . $this->color . " " . $this->model . "!";
}
}
$myCar = new Car("black", "Volvo");
echo $myCar -> message();
echo "
";
$myCar = new Car("red", "Toyota");
echo $myCar -> message();
?>