Object Properties : Objects « Class « PHP
- PHP
- Class
- Objects
Object Properties
<?
class Item {
var $name = "item";
}
$obj1 = new Item();
$obj2 = new Item();
$obj1->name = "widget 5442";
print "$obj1->name<br />";
print "$obj2->name<br />";
?>
Related examples in the same category